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()) }