Files
danbooru/app/controllers/note_previews_controller.rb
evazion 3f10eeb954 Fix #5227: Error on note previews due to URL length limit
Allow either GET or POST for /note_previews.
2022-08-24 16:27:05 -05:00

17 lines
335 B
Ruby

# frozen_string_literal: true
class NotePreviewsController < ApplicationController
respond_to :json
def show
@body = NoteSanitizer.sanitize(params[:body].to_s)
respond_with(@body) do |format|
format.json do
render :json => {:body => @body}.to_json
end
end
end
alias_method :create, :show
end