import { Body, Controller, Get, Post, Req, UseGuards } from '@nestjs/common'; import { SuperAdminService } from './super-admin.service'; import { SuperAdminGuard } from './super-admin.guard'; import { Public } from '../auth/public.decorator'; @Controller('auth/super') export class SuperAdminController { constructor(private readonly superAdminService: SuperAdminService) {} @Public() @Post('login') login(@Body() body: { email: string; password: string }) { return this.superAdminService.login(body.email, body.password); } @UseGuards(SuperAdminGuard) @Get('me') me(@Req() req: any) { return this.superAdminService.me(req.user.sub); } }