change entries error

This commit is contained in:
sylor_huang@126.com
2020-06-30 11:39:31 +08:00
parent ef3a95ba39
commit 09ee934ac1
2 changed files with 3 additions and 4 deletions
@@ -24,12 +24,11 @@ class Gitea::Repository::Entries::ListService < Gitea::ClientService
end
def render_result(response)
body = JSON.parse(response.body)
case response.status
when 200
body
JSON.parse(response.body).merge({"status": 1})
else
{status: -1, message: "#{body['message']}"}
{'status': -1, 'message': "#{body['message']}"}
end
end
end