32 lines
718 B
Go
32 lines
718 B
Go
package entertainment
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) CancelMatchCheck(session comm.IUserSession, req *pb.EntertainCancelMatchReq) (errdata *pb.ErrorData) {
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) CancelMatch(session comm.IUserSession, req *pb.EntertainCancelMatchReq) (errdata *pb.ErrorData) {
|
|
var (
|
|
err error
|
|
)
|
|
|
|
if err = this.module.match.CancelMatch(session.GetUserId()); err != nil {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_DBError,
|
|
Title: pb.ErrorCode_DBError.ToString(),
|
|
Message: err.Error(),
|
|
}
|
|
return
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "cancelmatch", &pb.EntertainCancelMatchResp{
|
|
Maych: true,
|
|
})
|
|
return
|
|
}
|