This commit is contained in:
2025-06-17 11:53:31 +08:00
parent 5c8182cdf9
commit 417d0671de
10 changed files with 87 additions and 114 deletions

View File

@@ -44,14 +44,7 @@ func (a *app) list(w http.ResponseWriter, r *http.Request) {
a.render.JSONErr(w, err.Error())
return
}
data := render.ResponseList{
Code: 0,
Message: "ok",
Count: count,
Data: res,
}
a.render.JSON(w, data)
a.render.JSON(w, render.NewResponseList(count, res))
default:
http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed)
}