From 62833a2bd644795d600e9fadba3208da89c3bfb4 Mon Sep 17 00:00:00 2001 From: fram3d Date: Tue, 3 Oct 2023 21:25:52 +0200 Subject: [PATCH] fix wording and spacing --- freeriders/routes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/freeriders/routes.py b/freeriders/routes.py index f6ff73c..eac5d8d 100644 --- a/freeriders/routes.py +++ b/freeriders/routes.py @@ -13,6 +13,7 @@ def sms(): return 'Error retriving last ticket' else: return 'HTTP request method not recogniezed' + @app.route('/submit', methods=['POST', 'GET']) def submit(): if request.method == 'GET': @@ -20,14 +21,14 @@ def submit(): elif request.method == 'POST': timenow = int(time.time()) ticket_input = request.form['ticket'] - ticket = Ticket(ticket=ticket_input, timestamp=timenow) + ticket = Ticket(ticket = ticket_input, timestamp = timenow) try: db.session.add(ticket) db.session.commit() - return 'Ticket je dodat' + return 'Ticket added' except: - return 'Dodavanje ticketa nije uspelo' + return 'Adding ticket failed' else: return 'HTTP request method not recogniezed'