add: UserRole for privelige handling

This commit is contained in:
Alex
2024-09-29 21:03:32 +02:00
parent 1ded8bee33
commit 72017c97ff
2 changed files with 20 additions and 11 deletions

View File

@@ -72,7 +72,8 @@ func (uc *UserController) UpdateHandler(c *gin.Context) {
// user.RoleID = existingUser.RoleID
// }
updatedUser, err := uc.Service.UpdateUser(&user)
updatedUser, err := uc.Service.UpdateUser(&user, userRole)
if err != nil {
switch err {
case errors.ErrUserNotFound: