// src/server/features/auth/index.ts
// Auth feature plugin - registers authentication routes

import fp from 'fastify-plugin';
import { authRoutes } from './auth.routes';
import { loggerService } from '@serverShared/lib/logger';

// Initialize logger for auth operations
const authLogger = loggerService.get('AUTH');

export default fp(async (fastify) => {
  authLogger.info('🔧 Registering Auth plugin with prefix: /api/auth');
  fastify.register(authRoutes, { prefix: '/api/auth' });
  authLogger.info('✅ Auth plugin registered successfully');
}, { name: 'auth' });
