added backend to cache manga updates requests

This commit is contained in:
wea_ondara
2023-11-20 17:01:37 +01:00
parent 34b0135da7
commit 29e1d2e499
19 changed files with 699 additions and 20 deletions

View File

@@ -0,0 +1,12 @@
import {Router} from 'express';
import {MangaUpdatesController} from '../controller/MangaUpdatesController.js';
import {MangaUpdatesCache} from '../cache/MangaUpdatesCache.js';
export default function mangaUpdatesRouter(cache: MangaUpdatesCache): Router {
const controller = new MangaUpdatesController(cache);
const router = Router();
router.post('/v1/series/search', controller.search.bind(controller));
router.get('/v1/series/:id', controller.getById.bind(controller));
router.get('/v1/series/:id/groups', controller.getGroupById.bind(controller));
return router;
}