更改:错误返回

This commit is contained in:
yystopf 2025-09-22 16:08:48 +08:00
parent 04b1dc4655
commit b28e941b8b
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ class Gitea::Repository::GetCodeService < Gitea::ClientService
when 200
{total_count: response.headers["x-total-count"], data: JSON.parse(response.body)}
else
nil
{total_count: 0, data: []}
end
end
end

View File

@ -34,7 +34,7 @@ class Gitea::Repository::GetExploreCodeService < Gitea::ClientService
when 200
{total_count: response.headers["x-total-count"], data: JSON.parse(response.body)}
else
nil
{total_count: 0, data: []}
end
end
end

View File

@ -35,7 +35,7 @@ class Gitea::Repository::GetUserCodeService < Gitea::ClientService
when 200
{total_count: response.headers["x-total-count"], data: JSON.parse(response.body)}
else
nil
{total_count: 0, data: []}
end
end
end