import { FastifyInstance } from 'fastify'; import * as controller from './local.controller'; async function localRoutes(fastify: FastifyInstance) { fastify.post('/library/scan', controller.scanLibrary); fastify.get('/library/:type', controller.listEntries); fastify.get('/library/:type/:id', controller.getEntry); fastify.get('/library/stream/:type/:id/:unit', controller.streamUnit); fastify.post('/library/:type/:id/match', controller.matchEntry); fastify.get('/library/:type/:id/units', controller.getUnits); fastify.get('/library/:type/cbz/:unitId/pages', controller.getCbzPages); fastify.get('/library/:type/cbz/:unitId/page/:page', controller.getCbzPage); } export default localRoutes;