Skip to content

Commit

Permalink
add: debug for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
alguadam committed Sep 28, 2023
1 parent 43f97df commit b0711f5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions iebank_api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 +'<br/>Database URL:' + db.session.bind.url.database
if db.session.bind.url.host:
text = text +'<br/>Database host:' + db.session.bind.url.host
if db.session.bind.url.port:
text = text +'<br/>Database port:' + db.session.bind.url.port
if db.session.bind.url.username:
text = text +'<br/>Database user:' + db.session.bind.url.username
if db.session.bind.url.password:
text = text +'<br/>Database password:' + db.session.bind.url.password
return text


@app.route('/accounts', methods=['POST'])
Expand Down

0 comments on commit b0711f5

Please sign in to comment.