Files
instrucoes_gerais/clube67/newwhats.local/plugins-modelos-criar-modificados/core-auth/index.ts
T

24 lines
763 B
TypeScript

// ============================================================
// Plugin: core-auth — Entry Point
// ============================================================
import { PluginInstance, PluginContext } from '../../backend/src/core/types';
import { createAuthRoutes } from './backend/routes';
import manifest from './manifest.json';
const plugin: PluginInstance = {
manifest: manifest as any,
async activate(ctx: PluginContext): Promise<void> {
const router = createAuthRoutes(ctx);
ctx.app.use('/api/auth', router);
ctx.logger.info('Auth routes registered at /api/auth');
},
async deactivate(ctx: PluginContext): Promise<void> {
ctx.logger.info('Auth plugin deactivated');
},
};
export default plugin;