silvermobi/handler/update_password.go

17 lines
425 B
Go
Raw Normal View History

2023-08-08 10:28:43 +00:00
package handler
import "context"
func (h *SilvermobiHandler) UpdatePassword(ctx context.Context, username string, password string) (response bool) {
account, err := h.Services.MobilityAccounts.GetAccountUsername(ctx, username, "silvermobi")
if err != nil {
return false
}
result := h.Services.MobilityAccounts.UpdatePassword(ctx, account.ID, password)
if result == true {
return true
} else {
return false
}
}