feat: Add API info to settings page

This is most useful when using an internal node with a random api key
This commit is contained in:
2025-09-02 17:54:56 +10:00
parent 83bd6b9643
commit 6d318a597b
3 changed files with 18 additions and 0 deletions

12
main.py
View File

@@ -1221,6 +1221,18 @@ def settings_action(action):
return render_template("message.html", account=account,
title="Restarting",
content="The node is restarting. This may take a minute or two. You can close this window.")
if action == "api-info":
content = f"API URL: <code>http://{account_module.HSD_IP}:{account_module.HSD_NODE_PORT}</code><br>"
content += f"Wallet URL: <code>http://{account_module.HSD_IP}:{account_module.HSD_WALLET_PORT}</code><br>"
content += f"API Key: <code>{account_module.HSD_API}</code><br><br>"
return render_template("message.html", account=account,
title="API Information",
content=content)
return redirect("/settings?error=Invalid action")