Fix api v2 index erroring on /V2
This commit is contained in:
parent
de85fe72a4
commit
5c59f46cec
@ -9,7 +9,7 @@ module YiffRest
|
|||||||
before_action -> { track_usage("images") }, only: %i[index categories category image]
|
before_action -> { track_usage("images") }, only: %i[index categories category image]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
return render_error(YiffyAPIErrorCodes::IMAGES_IMAGE_RESPONSE_DISABLED, error: "Image response has been disabled. Please use the json response.") if params[:category].ends_with?("/image")
|
return render_error(YiffyAPIErrorCodes::IMAGES_IMAGE_RESPONSE_DISABLED, error: "Image response has been disabled. Please use the json response.") if params[:category]&.ends_with?("/image")
|
||||||
|
|
||||||
category = params[:category]&.downcase&.gsub("/", ".") || ""
|
category = params[:category]&.downcase&.gsub("/", ".") || ""
|
||||||
category = category[3..] if category.start_with?("v2.")
|
category = category[3..] if category.start_with?("v2.")
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class E621ExportsJob < ApplicationJob
|
class E621ExportsJob < ApplicationJob
|
||||||
queue_as :low_priority
|
queue_as :low_priority
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class E621StatusUpdateJob < ApplicationJob
|
class E621StatusUpdateJob < ApplicationJob
|
||||||
queue_as :low_priority
|
queue_as :low_priority
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user