Skip to content
Snippets Groups Projects
Commit afbe69f4 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

get orientation pour orientation-details

parent f968c6d2
No related branches found
No related tags found
1 merge request!479Draft: feat(dashboard) : create dashboard !
Pipeline #123909 passed
......@@ -38,6 +38,19 @@ export class OrientationController {
return this.orientationService.findAll();
}
@Get('dashboard')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Get user orientations' })
@ApiResponse({ status: 200, description: 'Return user orientations with populated details.' })
@ApiResponse({ status: 500, description: 'Internal server error.' })
public async getDashboard(
@Request() req,
@Query('structureId') structureId?: string
): Promise<OrientationsDashboardDto> {
this.logger.debug(`find for user=${req.user._id}, structureId=${structureId}`);
return this.orientationService.getOrientationsDashboard(req.user._id, structureId);
}
@Get(':id')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Get orientation' })
......@@ -53,19 +66,6 @@ export class OrientationController {
return orientation;
}
@Get('dashboard')
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Get user orientations' })
@ApiResponse({ status: 200, description: 'Return user orientations with populated details.' })
@ApiResponse({ status: 500, description: 'Internal server error.' })
public async getDashboard(
@Request() req,
@Query('structureId') structureId?: string
): Promise<OrientationsDashboardDto> {
this.logger.debug(`find for user=${req.user._id}, structureId=${structureId}`);
return this.orientationService.getOrientationsDashboard(req.user._id, structureId);
}
@Post()
@UseGuards(JwtAuthGuard)
@ApiOperation({ summary: 'Save a new orientation' })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment