上传竞技场设置防守阵型问题
This commit is contained in:
parent
f01073cdad
commit
34de6aa72d
@ -7,7 +7,23 @@ import (
|
|||||||
|
|
||||||
// 参数校验
|
// 参数校验
|
||||||
func (this *apiComp) SetDefFormtCheck(session comm.IUserSession, req *pb.ArenaSetDefFormtReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) SetDefFormtCheck(session comm.IUserSession, req *pb.ArenaSetDefFormtReq) (errdata *pb.ErrorData) {
|
||||||
|
if len(req.Formt) == 0 {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: "阵容 不能为空!",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, v := range req.Formt {
|
||||||
|
if v != "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: "阵容 不能为空!",
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +67,6 @@ func (this *apiComp) SetDefFormt(session comm.IUserSession, req *pb.ArenaSetDefF
|
|||||||
Title: pb.ErrorCode_DBError.ToString(),
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
Message: err.Error(),
|
Message: err.Error(),
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "setdefformt", &pb.ArenaSetDefFormtResp{Issucc: true})
|
session.SendMsg(string(this.module.GetType()), "setdefformt", &pb.ArenaSetDefFormtResp{Issucc: true})
|
||||||
|
Loading…
Reference in New Issue
Block a user