add: UserRole for privelige handling
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user