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')
|
2021-07-21 08:44:28 -05:00
|
|
|
videoLanguageManager.addLanguage('al_bhed2', 'Al Bhed 2')
|
2021-06-29 09:02:05 -05:00
|
|
|
videoLanguageManager.addConstant('al_bhed3', 'Al Bhed 3')
|
|
|
|
videoLanguageManager.deleteConstant('en')
|
2021-07-21 08:44:28 -05:00
|
|
|
videoLanguageManager.deleteLanguage('fr')
|
2021-06-29 09:02:05 -05:00
|
|
|
videoLanguageManager.deleteConstant('al_bhed3')
|
2019-07-26 06:13:39 -05:00
|
|
|
|
2021-07-21 08:44:28 -05:00
|
|
|
videoCategoryManager.addCategory(42, 'Best category')
|
2021-06-29 09:02:05 -05:00
|
|
|
videoCategoryManager.addConstant(43, 'High best category')
|
|
|
|
videoCategoryManager.deleteConstant(1) // Music
|
2021-07-21 08:44:28 -05:00
|
|
|
videoCategoryManager.deleteCategory(2) // Films
|
2019-07-26 06:13:39 -05:00
|
|
|
|
2021-07-21 08:44:28 -05:00
|
|
|
videoLicenceManager.addLicence(42, 'Best licence')
|
2021-06-29 09:02:05 -05:00
|
|
|
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)
|
2021-07-21 08:44:28 -05:00
|
|
|
videoPrivacyManager.deletePrivacy(2)
|
2021-06-29 09:02:05 -05:00
|
|
|
playlistPrivacyManager.deleteConstant(3)
|
2021-07-21 08:44:28 -05:00
|
|
|
playlistPrivacyManager.deletePlaylistPrivacy(3)
|
2021-06-29 09:02:05 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
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
|
|
|
|
}
|