修改commits的错误提示

This commit is contained in:
sylor_huang@126.com
2020-04-22 15:14:52 +08:00
parent f9f5b9fdb7
commit 2738efb04d
3 changed files with 5 additions and 9 deletions

View File

@@ -24,9 +24,7 @@ class Gitea::Repository::Commits::ListService < Gitea::ClientService
end
def render_result(response)
Rails.logger.info("#####___________response.status_________##########{response.status}")
Rails.logger.info("#####___________response.body_________##########{response.body}")
body = JSON.parse(response.body)
case response.status
when 200
result = {}
@@ -35,7 +33,8 @@ class Gitea::Repository::Commits::ListService < Gitea::ClientService
total_count = headers["x-total"]
result.merge(total_count: total_count.to_i, body: body)
else
{status: -1, message: "#{body['message']}"}
nil
# {status: -1, message: "#{body['message']}"}
end
end
end