add error message when template not found

pull/217/head
Pete Matsyburka 2 years ago
parent 9b789889fa
commit 82f679c84c

@ -63,6 +63,8 @@ module Api
end end
def create def create
return render json: { error: 'Template not found' }, status: :unprocessable_entity if @template.nil?
params[:send_email] = true unless params.key?(:send_email) params[:send_email] = true unless params.key?(:send_email)
params[:send_sms] = false unless params.key?(:send_sms) params[:send_sms] = false unless params.key?(:send_sms)

Loading…
Cancel
Save