From c4560ebb664d4fbb8cfe9210b6d66003e2295776 Mon Sep 17 00:00:00 2001 From: jasder Date: Sun, 28 Mar 2021 20:05:13 +0800 Subject: [PATCH] FIX tags api bug --- app/controllers/repositories_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index f4dd3c8f0..10b352ae6 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -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