lint
This commit is contained in:
parent
1bd717e637
commit
35d4870734
@ -17,7 +17,7 @@ module OceanicWs
|
|||||||
end
|
end
|
||||||
|
|
||||||
def latest
|
def latest
|
||||||
redirect_to("/#{latest_version}#{request.fullpath[("/latest".length)..]}")
|
redirect_to("/#{latest_version}#{request.fullpath[('/latest'.length)..]}")
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -170,12 +170,13 @@ module YiffRest
|
|||||||
color = 0x008000
|
color = 0x008000
|
||||||
if bulk_categories.present?
|
if bulk_categories.present?
|
||||||
bulk = <<~BULK
|
bulk = <<~BULK
|
||||||
|
Total: **#{bulk_categories.values.sum}**
|
||||||
|
|
||||||
**Categories:**
|
**Categories:**
|
||||||
#{bulk_categories.permit!.to_h.map { |c, l| "- **#{c}**: #{l}" }.join("\n")}
|
#{bulk_categories.permit!.to_h.map { |c, l| "- **#{c}**: #{l}" }.join("\n")}
|
||||||
BULK
|
BULK
|
||||||
color = 0xDC143C if bulk_categories.keys.any? { |k| category_info.find { |c| c.db == k }.sfw }
|
color = 0xDC143C if bulk_categories.keys.any? { |k| category_info.find { |c| c.db == k }.sfw }
|
||||||
elsif !(category_info.find { |c| c.db == category }.sfw)
|
elsif !category_info.find { |c| c.db == category }.sfw
|
||||||
color = 0xDC143C
|
color = 0xDC143C
|
||||||
end
|
end
|
||||||
Websites.config.yiffyapi_usage_webhook.execute(embeds: [
|
Websites.config.yiffyapi_usage_webhook.execute(embeds: [
|
||||||
|
@ -22,7 +22,6 @@ class APIImage < ApplicationRecord
|
|||||||
after_destroy :delete_files
|
after_destroy :delete_files
|
||||||
after_destroy :send_deleted, unless: :no_webhook_messages
|
after_destroy :send_deleted, unless: :no_webhook_messages
|
||||||
|
|
||||||
|
|
||||||
def delete_files
|
def delete_files
|
||||||
Websites.config.yiffy2_storage.delete(path)
|
Websites.config.yiffy2_storage.delete(path)
|
||||||
invalidate_cache
|
invalidate_cache
|
||||||
|
Loading…
Reference in New Issue
Block a user