Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import { Controller, Get, Req, UseGuards } from '@nestjs/common'; import { ProjectService } from '../../../domains/projects/services/project.service'; import { JwtAuthGuard } from '../../../platform/auth/jwt-auth.guard'; import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; @Controller('api/v1/mobile/employee/projects') @ApiTags('MobileEmployeeProjects') @UseGuards(JwtAuthGuard) export class ProjectsMobileController { constructor(private readonly projectService: ProjectService) {} @Get() @ApiOperation({ summary: 'Get active projects for employee' }) @ApiResponse({ status: 200, description: 'List of active projects' }) async getMyProjects(@Req() req: any): Promise<any> { const tenantId = req.user?.tenantId || req.headers['x-tenant-id'] || 'SYSTEM'; return this.projectService.findAll(tenantId); } } |