Creating a CRM Super Admin

This commit is contained in:
2026-09-19 21:54:21 +03:30
parent ff5ad21eb9
commit b016b4754f
28 changed files with 2977 additions and 6 deletions
@@ -0,0 +1,22 @@
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
import { CurrentUser } from '../auth/current-user.decorator';
import { PlatformLoginDto } from './dto';
import { PlatformAuthGuard } from './platform-auth.guard';
import { PlatformAuthService } from './platform-auth.service';
import type { PlatformActor } from './platform-jwt.strategy';
@Controller('platform/auth')
export class PlatformAuthController {
constructor(private readonly auth: PlatformAuthService) {}
@Post('login')
login(@Body() dto: PlatformLoginDto) {
return this.auth.login(dto);
}
@Get('me')
@UseGuards(PlatformAuthGuard)
me(@CurrentUser() actor: PlatformActor) {
return this.auth.me(actor.platformAdminId);
}
}