blob: 730e2e8fa57da69594600e9dba784f9fdb086522 (
plain) (
tree)
|
|
import { expandShortenedLink } from '../../src/api';
/**
* Expand URLs
*
* @param {import("next").NextApiRequest} req
* @param {import("next").NextApiResponse} res
*/
export default function urlExpand(req, res) {
let url = (req.query.url || '').toString();
return expandShortenedLink(url).then(result => {
res.json(result);
});
}
|