diff --git a/src/users/test/users.controller.spec.ts b/src/users/test/users.controller.spec.ts index b8b7891..5fac361 100644 --- a/src/users/test/users.controller.spec.ts +++ b/src/users/test/users.controller.spec.ts @@ -58,12 +58,12 @@ describe('AuthController', () => { hasGoogleAccount: false, description: 'desc', password: 'password', - ratingsAvg: 0, companyId: '1', portfolio: ['1', '2'], previousWorkplaceCount: 0, previousWorkplaceId: ['1', '2'], profilePicture: 'picture', + cv: 'cv', }; const createSpy = jest diff --git a/src/users/user.repository.ts b/src/users/user.repository.ts index 28418ef..41d958c 100644 --- a/src/users/user.repository.ts +++ b/src/users/user.repository.ts @@ -26,10 +26,6 @@ export class UserRepository { '-previousWorkplace': { previousWorkplaceCount: 'desc', }, - ratings: { ratingsAvg: 'asc' }, - '-ratings': { - ratingsAvg: 'desc', - }, }; this.field = { @@ -90,10 +86,6 @@ export class UserRepository { const data = { ...user, previousWorkplaceCount: user.previousWorkplaceId?.length, - ratingsAvg: - user.ratings - ?.map((rating) => rating.ratingOf10) - .reduce((a, b) => a + b, 0) / user.ratings?.length, }; return this.prisma.user.create({ data,