- Complete monorepo structure with pnpm workspaces - Prisma database schema with 20+ entities - NestJS API with 9 core modules - BullMQ orchestration worker - AWS and Azure provider adapters - Docker Compose infrastructure - Complete documentation
24 lines
652 B
TypeScript
24 lines
652 B
TypeScript
import { Controller, Get, Param } from '@nestjs/common';
|
|
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
|
import { UsersService } from './users.service';
|
|
|
|
@ApiTags('users')
|
|
@Controller('users')
|
|
export class UsersController {
|
|
constructor(private readonly usersService: UsersService) {}
|
|
|
|
@Get()
|
|
@ApiOperation({ summary: 'Get all users' })
|
|
findAll() {
|
|
const tenantId = 'mock-tenant-id';
|
|
return this.usersService.findAll(tenantId);
|
|
}
|
|
|
|
@Get(':id')
|
|
@ApiOperation({ summary: 'Get user by ID' })
|
|
findOne(@Param('id') id: string) {
|
|
const tenantId = 'mock-tenant-id';
|
|
return this.usersService.findOne(id, tenantId);
|
|
}
|
|
}
|