mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 12:45:46 +08:00
FIX code bug
This commit is contained in:
@@ -43,7 +43,7 @@ class RepositoriesController < ApplicationController
|
|||||||
result = interactor.result
|
result = interactor.result
|
||||||
return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
|
return @sub_entries = [] if result.is_a?(Hash) && result[:status] == -1
|
||||||
|
|
||||||
@sub_entries = [] << result unless result.is_a? Array
|
@sub_entries = result.is_a?(Array) ? result : [result]
|
||||||
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
@sub_entries = @sub_entries.sort_by{ |hash| hash['type'] }
|
||||||
else
|
else
|
||||||
render_error(interactor.error)
|
render_error(interactor.error)
|
||||||
|
|||||||
Reference in New Issue
Block a user