go_dreamfactory/modules/linestory/api_chapter.go
2023-05-29 18:12:08 +08:00

25 lines
651 B
Go

package linestory
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
// 支线剧情任务-章节
func (this *apiComp) ChapterCheck(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Chapter(session comm.IUserSession, req *pb.LinestoryChapterReq) (code pb.ErrorCode, data *pb.ErrorData) {
uid := session.GetUserId()
taskMap := this.module.modelLinestory.getChapters(uid)
rsp := &pb.LinestoryChapterResp{
TaskChapter: taskMap,
}
if err := session.SendMsg(string(this.module.GetType()), LinestorySubTypeChapter, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}