From 60dbb8a129de4c0eac2b176c5e1c6434f2113c46 Mon Sep 17 00:00:00 2001 From: Ryan Kegel Date: Tue, 21 Apr 2026 16:07:07 -0400 Subject: [PATCH] feat: add environment variable support for admin user creation in backend --- backend/scripts/send_digest.py | 3 +++ frontend/vue-app/src/components/shared/LoginButton.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/scripts/send_digest.py b/backend/scripts/send_digest.py index e4d2361..a1414e2 100644 --- a/backend/scripts/send_digest.py +++ b/backend/scripts/send_digest.py @@ -18,6 +18,9 @@ import json import urllib.request import urllib.error +# NOTE: When targeting a proxied frontend URL (e.g. nginx), append /api to the URL. +# e.g. API_BASE_URL=https://dev.chores.ryankegel.com/api +# Without /api, nginx will not forward requests to the backend and will return 405. API_BASE_URL = os.environ.get('API_BASE_URL', 'http://localhost:5000').rstrip('/') diff --git a/frontend/vue-app/src/components/shared/LoginButton.vue b/frontend/vue-app/src/components/shared/LoginButton.vue index d2a8b76..73050b2 100644 --- a/frontend/vue-app/src/components/shared/LoginButton.vue +++ b/frontend/vue-app/src/components/shared/LoginButton.vue @@ -147,8 +147,8 @@ const submit = async () => { if (!isPushOptedOut()) { subscribeToPushWithResult() // fire-and-forget — browser gesture is satisfied by the PIN button click } - close() const returnUrl = consumePendingReturnUrl() + close() router.push(returnUrl || '/parent') } catch (e) { error.value = 'Network error'