diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..8cec9f9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + environment { + QODANA_TOKEN=credentials('qodana-token') + } + agent { + docker { + args ''' + -v "${WORKSPACE}":/data/project + --entrypoint="" + ''' + image 'jetbrains/qodana-go' + } + } + stages { + stage('Qodana') { + steps { + sh '''qodana''' + } + } + } +} \ No newline at end of file diff --git a/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go b/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go index 611e6af..4c0ebe1 100644 --- a/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go +++ b/internal/logic/SponsorServiceImpl/sponsorServiceImpl.go @@ -202,6 +202,8 @@ func (*SponsorServiceImpl) DeleteSponsor(req *ghttp.Request, entity entity.Spons } else { ResultUtil.ErrorNoData(req, ErrorCode.ServerDatabaseInteriorError) } + } else { + ResultUtil.ErrorNoData(req, ErrorCode.NoSponsor) } } else { ResultUtil.ErrorNoData(req, ErrorCode.NoPermission)