17 lines
892 B
TypeScript
17 lines
892 B
TypeScript
import { FastifyInstance } from 'fastify';
|
|
import * as controller from './extensions.controller';
|
|
|
|
async function extensionsRoutes(fastify: FastifyInstance) {
|
|
fastify.get('/extensions', controller.getExtensions);
|
|
fastify.get('/extensions/anime', controller.getAnimeExtensions);
|
|
fastify.post('/extensions/update', controller.updateExtensions);
|
|
fastify.get('/extensions/book', controller.getBookExtensions);
|
|
fastify.get('/extensions/manga', controller.getMangaExtensions);
|
|
fastify.get('/extensions/novel', controller.getNovelExtensions);
|
|
fastify.get('/extensions/gallery', controller.getGalleryExtensions);
|
|
fastify.get('/extensions/:name/settings', controller.getExtensionSettings);
|
|
fastify.post('/extensions/install', controller.installExtension);
|
|
fastify.post('/extensions/uninstall', controller.uninstallExtension);
|
|
}
|
|
|
|
export default extensionsRoutes; |