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
No related branches found
No related tags found
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 :
<table style="border: solid 1px">
<thead>
<tr>
<th style="padding: 8px">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">Besoin(s)</th>
<th style="padding: 8px">Créneau</th>
......
......@@ -8,7 +8,7 @@ export class OnlineMediationDto {
@IsNotEmpty()
@ApiProperty({ type: String })
readonly surname: string;
surname: string;
@IsNotEmpty()
@ApiProperty({ type: String })
......
......@@ -24,6 +24,7 @@ export class OnlineMediationService {
*/
public async create(newMediation: OnlineMediationDto): Promise<IOnlineMediation> {
try {
newMediation.surname = newMediation.surname.toUpperCase();
return await this.OnlineMediationModel.create(newMediation);
} catch (err) {
this.logger.error(`Creation Error : ${err}`);
......
......@@ -53,7 +53,13 @@ export class UsersService {
);
}
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.unattachedSince = DateTime.local();
// Send verification email
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment