From 876fdc419f19a2123deb03aa85d2f456dc10af78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 9 Nov 2023 01:58:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=AF=81=E4=B9=A6=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/controllers/cert_controller.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/http/controllers/cert_controller.go b/app/http/controllers/cert_controller.go index 43ea6185fb..11a5a47c5e 100644 --- a/app/http/controllers/cert_controller.go +++ b/app/http/controllers/cert_controller.go @@ -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) @@ -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) @@ -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) @@ -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)