1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-10 02:27:29 +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)
}
}
]