mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 14:57:16 +08:00
feat: 规范统一使用 422 状态码
This commit is contained in:
@@ -56,10 +56,10 @@ func (r *SshController) UpdateInfo(ctx http.Context) http.Response {
|
||||
"password": "required",
|
||||
})
|
||||
if err != nil {
|
||||
return Error(ctx, http.StatusBadRequest, err.Error())
|
||||
return Error(ctx, http.StatusUnprocessableEntity, err.Error())
|
||||
}
|
||||
if validator.Fails() {
|
||||
return Error(ctx, http.StatusBadRequest, validator.Errors().One())
|
||||
return Error(ctx, http.StatusUnprocessableEntity, validator.Errors().One())
|
||||
}
|
||||
|
||||
host := ctx.Request().Input("host")
|
||||
|
||||
Reference in New Issue
Block a user