注册
This commit is contained in:
@@ -38,7 +38,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
Handler: UserSaveBasicInfoHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Method: http.MethodGet,
|
||||
Path: "/api/user/status-config",
|
||||
Handler: UserStatusConfigHandler(serverCtx),
|
||||
},
|
||||
|
||||
@@ -28,6 +28,10 @@ func NewUserStatusConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
|
||||
func (l *UserStatusConfigLogic) UserStatusConfig(req *types.Request, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||
// 返回值必须调用Set重新返回, resp可以空指针调用 resp.SetStatus(basic.CodeOK, data)
|
||||
|
||||
if !userinfo.IsUser() {
|
||||
return resp.SetStatus(basic.CodeUnAuth)
|
||||
}
|
||||
|
||||
data := &types.DataStatusConfig{
|
||||
SearchList: []types.KeyName{
|
||||
{Key: -1, Name: "All"},
|
||||
|
||||
Reference in New Issue
Block a user