add nav link
This commit is contained in:
parent
7aac4f7e72
commit
e14419bc91
@ -466,7 +466,7 @@ class APIImage < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.all_seen
|
||||
Cache.fetch("img:all_seen", expires_in: 10.minutes) do
|
||||
Cache.fetch("img:all_seen", expires_in: 1.minutes) do
|
||||
keys = all.map { |img| "yiffy2:stats:image:#{img.md5}" }
|
||||
values = Cache.redis.mget(*keys)
|
||||
results = {}
|
||||
|
@ -14,6 +14,9 @@
|
||||
<li class="nav-item">
|
||||
<%= link_to("Image List", yiff_rest_api_v2_manage_images_path, class: "nav-link") %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to("Leaderboard", leaderboard_yiff_rest_api_v2_manage_images_path, class: "nav-link") %>
|
||||
</li>
|
||||
<% if params[:controller] == "yiff_rest/api_v2/manage" %>
|
||||
<% elsif params[:controller] == "yiff_rest/api_v2/images" %>
|
||||
<% if %w[index iqdb query_iqdb].include?(params[:action]) %>
|
||||
|
Loading…
Reference in New Issue
Block a user