add media download service and started using it
This commit is contained in:
1 parent
78399912f7
commit
06be888123
12 files changed
+614
-80
No files matched your search
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user