FIX tags api bug

This commit is contained in:
jasder 2021-03-28 20:05:13 +08:00
parent 0211d6152e
commit c4560ebb66
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@ class RepositoriesController < ApplicationController
end
def tags
@tags = Gitea::Repository::Tags::ListService.call(current_user&.gitea_token, @owner.login, @project.identifier, {page: params[:page], limit: params[:limit]})
result = Gitea::Repository::Tags::ListService.call(current_user&.gitea_token, @owner.login, @project.identifier, {page: params[:page], limit: params[:limit]})
@tags = result.is_a?(Hash) && result.key?(:status) ? [] : result
end
def contributors