implemented api for local library & global config
This commit is contained in:
14
desktop/src/api/local/local.routes.ts
Normal file
14
desktop/src/api/local/local.routes.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { FastifyInstance } from 'fastify';
|
||||
import * as controller from './local.controller';
|
||||
|
||||
async function localRoutes(fastify: FastifyInstance) {
|
||||
fastify.get('/library/config', controller.getConfig);
|
||||
fastify.post('/library/config', controller.setConfig);
|
||||
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);
|
||||
}
|
||||
|
||||
export default localRoutes;
|
||||
Reference in New Issue
Block a user