import { PluginInstance, PluginContext } from '../../backend/src/core/types';
import { createUploadRoutes } from './backend/routes';
import manifest from './manifest.json';

const plugin: PluginInstance = {
    manifest: manifest as any,
    async activate(ctx: PluginContext): Promise<void> {
        ctx.app.use('/api/uploads', createUploadRoutes(ctx));
        ctx.logger.info('Upload routes registered');
    },
    async deactivate(ctx: PluginContext): Promise<void> { ctx.logger.info('Uploads deactivated'); },
};
export default plugin;
