Skip to content

Commit

Permalink
feat(证书管理): 输出错误信息
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Nov 8, 2023
1 parent 3f64d81 commit 876fdc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/http/controllers/cert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (r *CertController) UserStore(ctx http.Context) http.Response {
facades.Log().Request(ctx.Request()).Tags("面板", "证书管理").With(map[string]any{
"error": err.Error(),
}).Error("添加ACME用户失败")
return ErrorSystem(ctx)
return Error(ctx, http.StatusInternalServerError, err.Error())
}

return Success(ctx, nil)
Expand Down Expand Up @@ -203,7 +203,7 @@ func (r *CertController) UserUpdate(ctx http.Context) http.Response {
"userID": updateRequest.ID,
"error": err.Error(),
}).Error("更新ACME用户失败")
return ErrorSystem(ctx)
return Error(ctx, http.StatusInternalServerError, err.Error())
}

return Success(ctx, nil)
Expand Down Expand Up @@ -264,7 +264,7 @@ func (r *CertController) UserDestroy(ctx http.Context) http.Response {
"userID": showAndDestroyRequest.ID,
"error": err.Error(),
}).Error("删除ACME用户失败")
return ErrorSystem(ctx)
return Error(ctx, http.StatusInternalServerError, err.Error())
}

return Success(ctx, nil)
Expand Down Expand Up @@ -420,7 +420,7 @@ func (r *CertController) DNSDestroy(ctx http.Context) http.Response {
"dnsID": showAndDestroyRequest.ID,
"error": err.Error(),
}).Error("删除DNS接口失败")
return ErrorSystem(ctx)
return Error(ctx, http.StatusInternalServerError, err.Error())
}

return Success(ctx, nil)
Expand Down

0 comments on commit 876fdc4

Please sign in to comment.