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)):