Make Google Maps settings available to the frontend #94
Labels
No labels
backend
beginner friendly
bug
chore
documentation
enhancement
frontend
needs-triage
no-stale
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
size/XS
stage/backlog
stage/done
stage/in progress
stage/in-progress
stage/ready
stale
wontfix
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/housing#94
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overall Objective
Create a small backend endpoint that gives the Maps page the settings it needs to load Google Maps.
The frontend should request these settings from the backend instead of putting a key directly into frontend code. This issue only supplies the settings; another contributor will build the map.
Suggested Approach
Create a new route file. Use the existing apps/backend/src/routes/health.ts as an example. Create apps/backend/src/routes/maps-config.ts and add it to the existing apps/backend/src/index.ts. You are creating GET /api/config/maps. The existing route group supplies /api, so your route adds /config/maps.
Return the settings or a missing-settings response. Return { "enabled": true, "apiKey": "…", "mapId": "…" } when both values exist, or { "enabled": false } when either is missing or blank. This checks whether settings are available.
Help & Resources