Skip to content

Commit

Permalink
Merge pull request #231 from kgashok/master
Browse files Browse the repository at this point in the history
  • Loading branch information
kgashok authored Jul 18, 2022
2 parents 7d62029 + 2860b46 commit 13449ce
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions saythanks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# |___|

import logging
from crypt import methods
import os
import json
import requests
Expand Down Expand Up @@ -201,11 +200,11 @@ def enable_inbox():

@app.route('/to/<inbox>', methods=['GET'], defaults={"topic": ""})
@app.route('/to/<inbox>&<topic>', methods=['GET'])
def display_submit_note(inbox, topic):
def display_submit_note(ibox, topic):
"""Display a web form in which user can edit and submit a note."""
if not storage.Inbox.does_exist(inbox):
if not storage.Inbox.does_exist(ibox):
abort(404)
elif not storage.Inbox.is_enabled(inbox):
elif not storage.Inbox.is_enabled(ibox):
abort(404)

fake_name = get_full_name()
Expand Down Expand Up @@ -247,10 +246,10 @@ def archive_note(uuid):


@app.route('/to/<inbox>/submit', methods=['POST'])
def submit_note(inbox):
def submit_note(ibox):
"""Store note in database and send a copy to user's email."""
# Fetch the current inbox.
inbox_db = storage.Inbox(inbox)
inbox_db = storage.Inbox(ibox)
body = request.form['body']
content_type = request.form['content-type']
byline = Markup(request.form['byline'])
Expand Down

0 comments on commit 13449ce

Please sign in to comment.