code: def check_sentence():
      
      text = ''
      if request.method == 'POST':
          text = request.form['text']
          if not text:
              error = 'No input'
              flash_message = error
          else:
              fb = check(request.form['text'])
              correct = False
              if request.form.get('is_correct') and not fb.primary_error:
                  correct = True
              elif not request.form.get('is_correct') and fb.primary_error:
                  correct = True
              sub = Submission(text=text, correct=correct, primary_error=fb.primary_error,
                      specific_error=fb.specific_error)
              session.add(sub)
              session.commit()
              # TODO: remove the hack below
              if not fb.primary_error:
                  fb.human_readable = "No errors were found."
              flash_message = fb.human_readable
  
          flash(flash_message)
      return render_template('check_sentence.html', text=text)
docs: Sole porcupine endpoint