diff --git a/app/controllers/yiff_rest/api_v2_controller.rb b/app/controllers/yiff_rest/api_v2_controller.rb index 7f64ae1..84399a7 100644 --- a/app/controllers/yiff_rest/api_v2_controller.rb +++ b/app/controllers/yiff_rest/api_v2_controller.rb @@ -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