"Allow" double versioning
This commit is contained in:
parent
61b92c347e
commit
1988bbf70b
@ -12,6 +12,7 @@ module YiffRest
|
|||||||
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.")
|
||||||
return redirect_to("https://yiff.rest") if category.blank?
|
return redirect_to("https://yiff.rest") if category.blank?
|
||||||
|
|
||||||
limit = params[:amount]&.to_i || 1
|
limit = params[:amount]&.to_i || 1
|
||||||
|
Loading…
Reference in New Issue
Block a user