mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-09-30 12:06:32 -05:00
Removed debug.py and moved the one endpoint to web.py
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
from flask_definitions import *
|
||||
from logic.time_handler import get_time
|
||||
|
||||
|
||||
@app.route("/debug/", methods=["Get"])
|
||||
def debug_root():
|
||||
check_for_game_client("soft")
|
||||
endpoint_descriptions = {
|
||||
'/debug/user': 'Endpoint to debug user information',
|
||||
'/debug/time': 'Endpoint to debug Epoch Time'}
|
||||
|
||||
endpoint_list = []
|
||||
for endpoint, description in endpoint_descriptions.items():
|
||||
endpoint_list.append(f'<li>{endpoint}: {description}</li>')
|
||||
|
||||
endpoints_html = '<ul>' + ''.join(endpoint_list) + '</ul>'
|
||||
return f'<h1>Debug Endpoints:</h1>{endpoints_html}'
|
||||
|
||||
|
||||
@app.route("/debug/time", methods=["Get"])
|
||||
def debug_time():
|
||||
current_time, expire_time = get_time()
|
||||
return jsonify({'current_time': current_time, 'expire_time': expire_time})
|
||||
Reference in New Issue
Block a user