Add: updating database..

This commit is contained in:
2021-12-13 22:21:24 +08:00
parent 1b0688e523
commit e1d9eac514
2 changed files with 14 additions and 9 deletions

View File

@@ -196,12 +196,6 @@ type GetUsersResponse struct {
}
func (api *API) HandleGetUsers(w http.ResponseWriter, r *http.Request) {
err := api.CheckAdmin(w, r)
if err != nil {
api.HandleError(w, r, err)
return
}
users, err := api.Db.GetUsers()
if err != nil {
api.HandleError(w, r, err)
@@ -320,7 +314,7 @@ func (api *API) HandleGetUserInfo(w http.ResponseWriter, r *http.Request) {
}
type UpdateUserPasswordRequest struct {
ID int64 `json:"id"`
ID int64 `json:"id"`
OldPassword string `json:"old_password"`
NewPassword string `json:"new_password"`
}