From b0711f5e3eb147dc4440ee8314c9629ab2fe71c2 Mon Sep 17 00:00:00 2001 From: Alvaro Guadamillas Date: Thu, 28 Sep 2023 16:22:06 +0200 Subject: [PATCH] add: debug for backend --- iebank_api/routes.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/iebank_api/routes.py b/iebank_api/routes.py index ae96894..138b0d8 100644 --- a/iebank_api/routes.py +++ b/iebank_api/routes.py @@ -2,14 +2,23 @@ from iebank_api import db, app from iebank_api.models import Account - @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/skull', methods=['GET']) def skull(): - return 'Hi! This is the BACKEND SKULL! 💀' + text = 'Hi! This is the BACKEND SKULL! 💀 ' + text = text +'
Database URL:' + db.session.bind.url.database + if db.session.bind.url.host: + text = text +'
Database host:' + db.session.bind.url.host + if db.session.bind.url.port: + text = text +'
Database port:' + db.session.bind.url.port + if db.session.bind.url.username: + text = text +'
Database user:' + db.session.bind.url.username + if db.session.bind.url.password: + text = text +'
Database password:' + db.session.bind.url.password + return text @app.route('/accounts', methods=['POST'])