add media download service and started using it

This commit is contained in:
X4Lo committed 2024-05-18 15:28:42 +01:00
1 parent 78399912f7
commit 06be888123
12 files changed
+614 -80

No files matched your search

+2 -1
View File
@@ -36,7 +36,7 @@ app.use('/api/v1/media/:category/:type', (req, res, next) => {
return res.status(404).send('Not Found');
}
if (!['banners', 'posters', 'others'].includes(type)) {
if (!['backdrops', 'posters', 'others'].includes(type)) {
return res.status(404).send('Not Found');
}
@@ -51,6 +51,7 @@ app.use('/api/v1/media/:category/:type', (req, res, next) => {
app.use('/api/v1', routes);
// ! Error handling middleware
const errorHandler = require('./middleware/errorHandler');
app.use(errorHandler);
// Start the server