From ab0968bef99e0a7fdd562a4ca14fed1bf21357fa Mon Sep 17 00:00:00 2001 From: chenyifan01 Date: Tue, 31 Jan 2023 15:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/api/v1/admin/role.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/admin/role.go b/routers/api/v1/admin/role.go index c016ef284..a713f2e18 100644 --- a/routers/api/v1/admin/role.go +++ b/routers/api/v1/admin/role.go @@ -11,13 +11,13 @@ import ( func AddRole(ctx *context.APIContext, form models.AddRoleReq) { user, err := models.GetUserByName(form.UserName) if err != nil { - ctx.JSON(http.StatusOK, response.ServerError("User not exists")) + ctx.JSON(http.StatusOK, response.OuterServerError("User not exists")) return } err = role.AddUserRole(user.ID, form.RoleType) if err != nil { - ctx.JSON(http.StatusOK, response.ResponseError(err)) + ctx.JSON(http.StatusOK, response.OuterResponseError(err)) return } - ctx.JSON(http.StatusOK, response.Success()) + ctx.JSON(http.StatusOK, response.OuterSuccess()) }