Project Initialization

This commit is contained in:
Muluhabt
2026-05-12 15:17:16 +03:00
parent 33fa742e8a
commit 3b8b6979db
259 changed files with 15962 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { Body, Controller, Get, Param, ParseUUIDPipe, Post } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { CustomersService } from './customers.service';
import { CreateCustomerDto } from './dto/create-customer.dto';
@ApiTags('customers')
// @UseGuards(JwtAuthGuard) — TODO: integrate @edr/auth
@Controller('customers')
export class CustomersController {
constructor(private readonly customersService: CustomersService) {}
@Post()
@ApiOperation({ summary: 'Create a new customer' })
create(@Body() dto: CreateCustomerDto) {
return this.customersService.create(dto);
}
@Get()
@ApiOperation({ summary: 'List all customers' })
findAll() {
return this.customersService.findAll();
}
@Get(':id')
@ApiOperation({ summary: 'Get a customer by ID' })
findOne(@Param('id', ParseUUIDPipe) id: string) {
return this.customersService.findById(id);
}
}