diff --git a/package.json b/package.json index d390ad1..e150897 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkedout-backend", - "version": "2.26.4", + "version": "2.26.5", "license": "ISC", "engines": { "node": "18.x" diff --git a/src/user-profiles/user-profiles.service.ts b/src/user-profiles/user-profiles.service.ts index 9cdd78b..9194b08 100644 --- a/src/user-profiles/user-profiles.service.ts +++ b/src/user-profiles/user-profiles.service.ts @@ -512,7 +512,8 @@ export class UserProfilesService { WHERE u."deletedAt" IS NULL AND up."isAvailable" IS TRUE AND up.department IN (${sameRegionDepartmentsOptions.map( - (department) => `'${department}'` + // remplacer un appostrophe par deux appostrophes + (department) => `'${department.replace(/'/g, "''")}'` )}) AND u.role IN (${rolesToFind.map((role) => `'${role}'`)}) AND u."lastConnection" IS NOT NULL @@ -566,7 +567,7 @@ export class UserProfilesService { const businessLinesMatching = (businessLines.length - businessLinesDifference.length) * UserProfileRecommendationsWeights.BUSINESS_LINES; - + const profileHelps = profile.profileHelps ? profile.profileHelps.split(', ') : [];