feat: update user password

This commit is contained in:
hanif salafi 2025-02-10 10:17:30 +07:00
parent 8e74712821
commit 3461d24bcd
1 changed files with 3 additions and 1 deletions

View File

@ -235,7 +235,9 @@ func (_i *usersService) SavePassword(req request.UserSavePassword, authToken str
if authToken != "" { if authToken != "" {
createdBy := utilSvc.GetUserInfo(_i.Log, _i.Repo, authToken) createdBy := utilSvc.GetUserInfo(_i.Log, _i.Repo, authToken)
err := _i.Keycloak.SetPassword(authToken, *createdBy.KeycloakId, req.Password) tokenString := strings.TrimPrefix(authToken, "Bearer ")
err := _i.Keycloak.SetPassword(tokenString, *createdBy.KeycloakId, req.Password)
if err != nil { if err != nil {
return err return err
} }