Merge pull request 'fix(employees): fix profile route to actually include email in route as param' (#4) from auth-session-fullstack into main
Reviewed-on: Targo/targo_backend#4
This commit is contained in:
commit
bc3a3b96d8
|
|
@ -384,7 +384,7 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/employees/profile": {
|
||||
"/employees/profile/{email}": {
|
||||
"get": {
|
||||
"operationId": "EmployeesController_findOneProfile",
|
||||
"parameters": [
|
||||
|
|
@ -392,6 +392,7 @@
|
|||
"name": "email",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"description": "Identifier of the employee",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,11 +51,12 @@ export class EmployeesController {
|
|||
return this.employeesService.findOne(id);
|
||||
}
|
||||
|
||||
@Get('profile')
|
||||
@Get('profile/:email')
|
||||
@ApiOperation({summary: 'Find employee profile' })
|
||||
@ApiParam({ name: 'email', type: String, description: 'Identifier of the employee' })
|
||||
@ApiResponse({ status: 200, description: 'Employee profile found', type: EmployeeProfileItemDto })
|
||||
@ApiResponse({ status: 400, description: 'Employee profile not found' })
|
||||
findOneProfile(@Param('email', ParseIntPipe)email: string): Promise<EmployeeProfileItemDto> {
|
||||
findOneProfile(@Param('email') email: string): Promise<EmployeeProfileItemDto> {
|
||||
return this.employeesService.findOneProfile(email);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user