This commit is contained in:
Donovan Daniels 2024-05-08 21:25:36 -05:00
parent 1bd717e637
commit 35d4870734
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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: [

View File

@ -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