mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 02:07:26 +08:00
feat: 规范统一使用 422 状态码
This commit is contained in:
@@ -145,7 +145,7 @@ func (c *RedisController) SaveConfig(ctx http.Context) http.Response {
|
||||
|
||||
config := ctx.Request().Input("config")
|
||||
if len(config) == 0 {
|
||||
return controllers.Error(ctx, http.StatusBadRequest, "配置不能为空")
|
||||
return controllers.Error(ctx, http.StatusUnprocessableEntity, "配置不能为空")
|
||||
}
|
||||
|
||||
if !tools.Write("/www/server/redis/redis.conf", config, 0644) {
|
||||
|
||||
Reference in New Issue
Block a user