Skip to content

Commit

Permalink
fix: user update/create fixes (#3932)
Browse files Browse the repository at this point in the history
  • Loading branch information
YazeedLoonat authored Mar 7, 2024
1 parent 5662226 commit fcb3631
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api/src/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export class UserService {
// only update userRoles if something has changed
if (dto.userRoles && storedUser.userRoles) {
if (
requestingUser.userRoles.isAdmin &&
!(
dto.userRoles.isAdmin === storedUser.userRoles.isAdmin &&
dto.userRoles.isJurisdictionalAdmin ===
Expand Down Expand Up @@ -551,11 +552,6 @@ export class UserService {
listings: {
connect: listings.map((listing) => ({ id: listing.id })),
},
userRoles: {
create: {
...dto.userRoles,
},
},
},
where: {
id: existingUser.id,
Expand Down

0 comments on commit fcb3631

Please sign in to comment.