error update if declined

This commit is contained in:
Pete Matsyburka
2026-03-11 23:44:06 +02:00
parent 9c02ed66f5
commit 3e250bfb28
@@ -40,6 +40,10 @@ module Api
return render json: { error: 'Submitter has already completed the submission.' }, status: :unprocessable_content
end
if @submitter.declined_at?
return render json: { error: 'Submitter has already declined the submission.' }, status: :unprocessable_content
end
submission = @submitter.submission
role = submission.template_submitters.find { |e| e['uuid'] == @submitter.uuid }['name']