From 24c934a9a84363b749b4e8c0d03ad0619705dfeb Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sat, 11 Aug 2018 15:23:47 +0300 Subject: [PATCH 1/2] Break code --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 7cbb768..2e25f70 100644 --- a/src/main.py +++ b/src/main.py @@ -54,7 +54,7 @@ def get_short_url(): url = shortened_urls.get(short_code) if not url: return error(ERROR_SHORT_CODE_DOES_NOT_EXIST) - return redirect(url, code=302) + # return redirect(url, code=302) def error(code): return jsonify({"error_code": code}) From 725cd3d3af896de952a21181f901b12e1501f0ac Mon Sep 17 00:00:00 2001 From: Richard Artoul Date: Sat, 11 Aug 2018 15:25:50 +0300 Subject: [PATCH 2/2] Fix broken code --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 2e25f70..7cbb768 100644 --- a/src/main.py +++ b/src/main.py @@ -54,7 +54,7 @@ def get_short_url(): url = shortened_urls.get(short_code) if not url: return error(ERROR_SHORT_CODE_DOES_NOT_EXIST) - # return redirect(url, code=302) + return redirect(url, code=302) def error(code): return jsonify({"error_code": code})