Initial commit after migration to gitea

This commit is contained in:
2026-01-18 11:27:43 +03:30
parent a21039410c
commit ea4b8eb543
196 changed files with 45567 additions and 9 deletions

View File

@@ -0,0 +1,37 @@
import {
Body,
Controller,
Get,
Post,
UseGuards,
} from "@nestjs/common";
import { ApiBearerAuth, ApiTags } from "@nestjs/swagger";
import { GlobalGuard } from "src/auth/guards/global.guard";
import { CurrentUser } from "src/decorators/user.decorator";
import { ClientService } from "./client.service";
import { ClientDto } from "./dto/create-client.dto";
@Controller("client")
@ApiTags("client-management")
export class ClientController {
constructor(private readonly clientService: ClientService) {}
@Post()
@UseGuards(GlobalGuard)
@ApiBearerAuth()
async addClient(@Body() client: ClientDto) {
return await this.clientService.addClient(client);
}
@Get()
@ApiBearerAuth()
@UseGuards(GlobalGuard)
async getClient(@CurrentUser() user) {
return await this.clientService.getClients();
}
@Get("list")
async getClientList(@CurrentUser() user) {
return await this.clientService.getClientList();
}
}