From a51bb2af9d7369a1e286316b67eb785e7b2b2973 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 25 Jan 2021 22:57:15 +0100 Subject: [PATCH] changed the landing message --- api.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index 99d5182..7c186c3 100644 --- a/api.py +++ b/api.py @@ -140,8 +140,8 @@ def add_other_db(timestamp,seedText,request_type): @app.route('/', methods=['GET']) def home(): - return '''

Queer API

-

A prototype API.

''' + return '''

Queer Motto API: To know exactly how many times to cry

+https://gitlab.com/siusoon/queer-motto-api''' @app.route('/queermottoAPI/r1/refusal', methods=['GET']) @@ -173,10 +173,13 @@ def api_args(): orgVal = str(request.args['org']) orgVal = bytes(orgVal, encoding='utf-8') if (rqstr == "generate" and orgVal == f1.decrypt(secrettoken1)) or (rqstr == "generate" and orgVal == f2.decrypt(secrettoken2)): + # Here we match the token to the organisation if orgVal == f1.decrypt(secrettoken1): org = "transmediale" elif orgVal == f2.decrypt(secrettoken2): org = "test" + # Another token can be added here + # Generate the motto api_phrase_str = '' for i in range(len(seedTextList)):