修正params

This commit is contained in:
2023-05-16 05:30:52 +08:00
parent f899e84b48
commit 119f579d70
4 changed files with 59 additions and 18 deletions

View File

@@ -115,7 +115,7 @@ func UsersItemDelete(w http.ResponseWriter, r *http.Request) {
models.AccountRead(w, r, func(account *models.Account) {
var user models.User = models.User{ID: utils.ParamInt(mux.Vars(r)["id"], 0)}
// 獲取目標用戶
// 獲取用戶
if err := configs.ORMDB().First(&user).Error; err != nil {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("404 - " + err.Error()))