Skip to content
Snippets Groups Projects
Commit c69513e5 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch '53-retours-review' into 'dev'

53 retours review

See merge request !264
parents 2059ede1 1ff51f6b
Branches
Tags
2 merge requests!266V2.1.2,!26453 retours review
...@@ -7,8 +7,8 @@ Veuillez trouver ci-joint la liste des demandes d'aide en ligne du jour : ...@@ -7,8 +7,8 @@ Veuillez trouver ci-joint la liste des demandes d'aide en ligne du jour :
<table style="border: solid 1px"> <table style="border: solid 1px">
<thead> <thead>
<tr> <tr>
<th style="padding: 8px">Nom</th>
<th style="padding: 8px">Prénom</th> <th style="padding: 8px">Prénom</th>
<th style="padding: 8px">Nom</th>
<th style="padding: 8px">Téléphone</th> <th style="padding: 8px">Téléphone</th>
<th style="padding: 8px">Besoin(s)</th> <th style="padding: 8px">Besoin(s)</th>
<th style="padding: 8px">Créneau</th> <th style="padding: 8px">Créneau</th>
......
...@@ -8,7 +8,7 @@ export class OnlineMediationDto { ...@@ -8,7 +8,7 @@ export class OnlineMediationDto {
@IsNotEmpty() @IsNotEmpty()
@ApiProperty({ type: String }) @ApiProperty({ type: String })
readonly surname: string; surname: string;
@IsNotEmpty() @IsNotEmpty()
@ApiProperty({ type: String }) @ApiProperty({ type: String })
......
...@@ -24,6 +24,7 @@ export class OnlineMediationService { ...@@ -24,6 +24,7 @@ export class OnlineMediationService {
*/ */
public async create(newMediation: OnlineMediationDto): Promise<IOnlineMediation> { public async create(newMediation: OnlineMediationDto): Promise<IOnlineMediation> {
try { try {
newMediation.surname = newMediation.surname.toUpperCase();
return await this.OnlineMediationModel.create(newMediation); return await this.OnlineMediationModel.create(newMediation);
} catch (err) { } catch (err) {
this.logger.error(`Creation Error : ${err}`); this.logger.error(`Creation Error : ${err}`);
......
...@@ -53,7 +53,13 @@ export class UsersService { ...@@ -53,7 +53,13 @@ export class UsersService {
); );
} }
let createUser = new this.userModel(createUserDto); let createUser = new this.userModel(createUserDto);
createUser.structuresLink = createUser.structuresLink.map((id) => new Types.ObjectId(id)); createUser.surname = createUser.surname.toUpperCase();
createUser.structuresLink = [];
if (createUserDto.structuresLink) {
createUserDto.structuresLink.forEach((structureId) => {
createUser.structuresLink.push(new Types.ObjectId(structureId));
});
}
createUser.password = await this.hashPassword(createUser.password); createUser.password = await this.hashPassword(createUser.password);
createUser.unattachedSince = DateTime.local(); createUser.unattachedSince = DateTime.local();
// Send verification email // Send verification email
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment