From 768dd1e304a3cead77644c88bd9530281ab1ede1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 8 Jun 2023 20:54:20 +0800 Subject: [PATCH] err --- modules/pagoda/api_challenge.go | 2 +- modules/pagoda/api_challengeover.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pagoda/api_challenge.go b/modules/pagoda/api_challenge.go index e684845c4..abba8ed13 100644 --- a/modules/pagoda/api_challenge.go +++ b/modules/pagoda/api_challenge.go @@ -28,7 +28,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng } conf, err := this.module.configure.GetPagodaConfigData(req.Cid) - if conf != nil { + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_PagodaNotFound, Title: pb.ErrorCode_PagodaNotFound.ToString(), diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 59d4b270a..94d7fe6b5 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -37,7 +37,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal } conf, err := this.module.configure.GetPagodaConfigData(req.Cid) - if conf != nil { + if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_PagodaNotFound, Title: pb.ErrorCode_PagodaNotFound.ToString(),