1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-09-20 03:07:28 +00:00
cloudtube/api/redirects.js

11 lines
273 B
JavaScript
Raw Normal View History

2021-02-03 07:49:21 +00:00
const constants = require("../utils/constants")
const {redirect} = require("pinski/plugins")
module.exports = [
{
route: `/(${constants.regex.video_id})`, priority: -1, methods: ["GET"], code: async ({fill}) => {
return redirect(`/watch?v=${fill[0]}`, 301)
}
}
]