diff --git a/app/api/mobile/apis/blockchains.rb b/app/api/mobile/apis/blockchains.rb index d4f67f22e..b4b4c4d51 100644 --- a/app/api/mobile/apis/blockchains.rb +++ b/app/api/mobile/apis/blockchains.rb @@ -69,7 +69,7 @@ module Mobile {status:-1, message: '该项目不存在' } end else - {status:-1, message: '该项目不存在或已被删除啦' } + {status:-1, message: '该项目不存在或已被删除' } end end @@ -82,7 +82,7 @@ module Mobile requires :ownername, type: String requires :reponame, type: String end - post 'getPushInfo' do + post 'getCommitInfo' do authenticate! owner = User.find_by_login(params[:ownername]) if owner @@ -95,14 +95,18 @@ module Mobile sha = params[:shaList][i] Rails.logger.info sha commit = g.commit(project.gpid, sha) - result << commit + if commit + result << true + else + result << false + end end {status:0, result:result} else - Rails.logger.info "project not found" + {status:1, message: '该项目不存在或已被删除' } end else - Rails.logger.info "owner not found" + {status:1, message: '该项目不存在或已被删除' } end end