Fix #5227: Error on note previews due to URL length limit
Allow either GET or POST for /note_previews.
This commit is contained in:
@@ -11,4 +11,6 @@ class NotePreviewsController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
alias_method :create, :show
|
||||
end
|
||||
|
||||
@@ -526,7 +526,7 @@ class Note {
|
||||
|
||||
async preview_text(text) {
|
||||
this.display_text("Loading...");
|
||||
let response = await $.getJSON("/note_previews", { body: text });
|
||||
let response = await $.post("/note_previews", { body: text });
|
||||
|
||||
this.display_text(response.body);
|
||||
this.initialize();
|
||||
|
||||
@@ -172,7 +172,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
resources :note_versions, :only => [:index, :show]
|
||||
resource :note_previews, :only => [:show]
|
||||
resource :note_previews, only: [:create, :show]
|
||||
resource :password_reset, only: [:create, :show]
|
||||
resources :pixiv_ugoira_frame_data, only: [:index]
|
||||
resources :pools do
|
||||
|
||||
Reference in New Issue
Block a user