"Allow" double versioning

This commit is contained in:
Donovan Daniels 2024-05-03 01:39:05 -05:00
parent 61b92c347e
commit 1988bbf70b
Signed by: Donovan_DMC
GPG Key ID: 907D29CBFD6157BA

View File

@ -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")
category = params[:category]&.downcase&.gsub("/", ".") || ""
category = category[3..] if category.start_with?("v2.")
return redirect_to("https://yiff.rest") if category.blank?
limit = params[:amount]&.to_i || 1