FIX: Return a 404 when the draft_key is missing

Previously if `draft_key` was missing you'd get a 500 error in the logs.
This commit is contained in:
Robin Ward
2020-02-14 10:48:56 -05:00
parent aad46a1aba
commit bfdd42c53a
2 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,8 @@ class DraftController < ApplicationController
end
def update
raise Discourse::NotFound.new if params[:draft_key].blank?
sequence =
begin
Draft.set(