mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
return 422 on form update values when completed
This commit is contained in:
1 parent
9f48c6e625
commit
62eb0cda6b
1 file changed
+4
@@ -38,6 +38,10 @@ class SubmitFormController < ApplicationController
|
||||
def update
|
||||
submitter = Submitter.find_by!(slug: params[:slug])
|
||||
|
||||
if submitter.completed_at?
|
||||
return render json: { error: 'Form has been completed already.' }, status: :unprocessable_entity
|
||||
end
|
||||
|
||||
Submitters::SubmitValues.call(submitter, params, request)
|
||||
|
||||
head :ok
|
||||
|
||||
Reference in new issue
Block a user