diff --git a/app/services/gitea/repository/entries/list_service.rb b/app/services/gitea/repository/entries/list_service.rb index 1547b8f00..85b2c76e1 100644 --- a/app/services/gitea/repository/entries/list_service.rb +++ b/app/services/gitea/repository/entries/list_service.rb @@ -24,9 +24,10 @@ class Gitea::Repository::Entries::ListService < Gitea::ClientService end def render_result(response) + body = JSON.parse(response.body) case response.status when 200 - JSON.parse(response.body).merge({"status": 1}) + body.merge!({"status": 1}) else {'status': -1, 'message': "#{body['message']}"} end