Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_server
1 result
Show changes
Commits on Source (4)
......@@ -22,7 +22,6 @@ export class StructureDto {
@Type(() => Address)
address: Address;
@IsNotEmpty()
contactPhone: string;
@IsNotEmpty()
......
......@@ -197,7 +197,11 @@ export class UsersController {
@Get(':id')
@ApiParam({ name: 'id', type: String, required: true })
public async getUser(@Param() params): Promise<IUser> {
return this.usersService.findById(params.id);
const user = await this.usersService.findById(params.id);
if (!user) {
throw new HttpException('User does not exist', HttpStatus.NOT_FOUND);
}
return user;
}
@ApiResponse({ status: HttpStatus.CREATED, description: 'Description updated' })
......