diff --git a/api/redirects.js b/api/redirects.js index 34aa433..5a02ab3 100644 --- a/api/redirects.js +++ b/api/redirects.js @@ -4,9 +4,7 @@ const {redirect} = require("pinski/plugins") module.exports = [ { route: `/(${constants.regex.video_id})`, priority: -1, methods: ["GET"], code: async ({fill, url}) => { - const target = new URLSearchParams(url.search) - target.set("v", fill[0]) - return redirect(`/watch?${target}`, 301) + return redirect(`/watch?v=${fill[0]}${url.search.replace(/^\?/, "&")}`, 301) } } ]