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/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;