2019-07-26 06:13:39 -05:00
|
|
|
async function register ({
|
|
|
|
videoCategoryManager,
|
|
|
|
videoLicenceManager,
|
2020-04-20 08:32:11 -05:00
|
|
|
videoLanguageManager,
|
|
|
|
videoPrivacyManager,
|
2021-06-29 09:02:05 -05:00
|
|
|
playlistPrivacyManager,
|
|
|
|
getRouter
|
2019-07-26 06:13:39 -05:00
|
|
|
}) {
|
2021-06-29 09:02:05 -05:00
|
|
|
videoLanguageManager.addConstant('al_bhed', 'Al Bhed')
|
|
|
|
videoLanguageManager.addConstant('al_bhed2', 'Al Bhed 2')
|
|
|
|
videoLanguageManager.addConstant('al_bhed3', 'Al Bhed 3')
|
|
|
|
videoLanguageManager.deleteConstant('en')
|
|
|
|
videoLanguageManager.deleteConstant('fr')
|
|
|
|
videoLanguageManager.deleteConstant('al_bhed3')
|
2019-07-26 06:13:39 -05:00
|
|
|
|
2021-06-29 09:02:05 -05:00
|
|
|
videoCategoryManager.addConstant(42, 'Best category')
|
|
|
|
videoCategoryManager.addConstant(43, 'High best category')
|
|
|
|
videoCategoryManager.deleteConstant(1) // Music
|
|
|
|
videoCategoryManager.deleteConstant(2) // Films
|
2019-07-26 06:13:39 -05:00
|
|
|
|
2021-06-29 09:02:05 -05:00
|
|
|
videoLicenceManager.addConstant(42, 'Best licence')
|
|
|
|
videoLicenceManager.addConstant(43, 'High best licence')
|
|
|
|
videoLicenceManager.deleteConstant(1) // Attribution
|
|
|
|
videoLicenceManager.deleteConstant(7) // Public domain
|
2020-04-20 08:32:11 -05:00
|
|
|
|
2021-06-29 09:02:05 -05:00
|
|
|
videoPrivacyManager.deleteConstant(2)
|
|
|
|
playlistPrivacyManager.deleteConstant(3)
|
|
|
|
|
|
|
|
{
|
|
|
|
const router = getRouter()
|
|
|
|
router.get('/reset-categories', (req, res) => {
|
|
|
|
videoCategoryManager.resetConstants()
|
2019-07-26 06:13:39 -05:00
|
|
|
|
2021-06-29 09:02:05 -05:00
|
|
|
res.sendStatus(204)
|
|
|
|
})
|
|
|
|
}
|
2019-07-26 06:13:39 -05:00
|
|
|
}
|
|
|
|
|
2021-06-29 09:02:05 -05:00
|
|
|
async function unregister () {}
|
|
|
|
|
2019-07-26 06:13:39 -05:00
|
|
|
module.exports = {
|
|
|
|
register,
|
|
|
|
unregister
|
|
|
|
}
|