Improve response message.

This commit is contained in:
Yang Luo
2021-03-28 08:59:12 +08:00
parent d6715c7601
commit 0127f8fb63
12 changed files with 28 additions and 29 deletions

View File

@ -93,7 +93,7 @@ func getObject(ctx *context.Context) (string, string) {
func denyRequest(ctx *context.Context) {
w := ctx.ResponseWriter
w.WriteHeader(403)
resp := &controllers.Response{Status: "error", Msg: "unauthorized operation"}
resp := &controllers.Response{Status: "error", Msg: "Unauthorized operation"}
_, err := w.Write([]byte(util.StructToJson(resp)))
if err != nil {
panic(err)