add error message when template not found

This commit is contained in:
Pete Matsyburka
2023-12-28 17:39:09 +02:00
parent 9b789889fa
commit 82f679c84c
@@ -63,6 +63,8 @@ module Api
end
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_sms] = false unless params.key?(:send_sms)