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