Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] CDD-2091: Ordinance survey maps #451

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

8lane
Copy link
Contributor

@8lane 8lane commented Jul 18, 2024

Description

PR adding Ordinance Survey Maps behind a feature toggle. Also sneaked in boundary restrictions to all maps so users can't pan or zoom outside of UK.

Copy link

github-actions bot commented Jul 19, 2024

Unit tests coverage

Lines Statements Branches Functions
Coverage: 96%
95.12% (1599/1681) 85.75% (337/393) 96.28% (233/242)
Tests Skipped Failures Errors Time
425 0 💤 0 ❌ 0 🔥 14.378s ⏱️

@8lane 8lane changed the title Feat/cdd 2091 os maps CDD-2091: Ordinance survey maps Jul 23, 2024
@8lane 8lane force-pushed the feat/CDD-2091-OSMaps branch from a1e8370 to e24567d Compare July 23, 2024 16:54
@8lane 8lane marked this pull request as ready for review July 23, 2024 16:58
@8lane 8lane force-pushed the feat/CDD-2091-OSMaps branch from e24567d to 58c929f Compare July 23, 2024 17:01
token_type: z.string(),
})

export async function POST() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the server side api endpoint that handles the oauth request to OSM


const proxyResponseSchema = z.object({ token: z.string(), expiresIn: z.string() })

async function getToken() {
Copy link
Contributor Author

@8lane 8lane Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the client side request handler responsible for hitting the proxy api endpoint. It receives the token and expiration in the response. It will also refetch automatically after the token has expired.

@8lane 8lane force-pushed the feat/CDD-2091-OSMaps branch from 46671d7 to aa6f0ef Compare July 23, 2024 17:22
rhys-burendo
rhys-burendo previously approved these changes Jul 24, 2024
@8lane 8lane changed the title CDD-2091: Ordinance survey maps [DO NOT MERGE] CDD-2091: Ordinance survey maps Jul 29, 2024
Copy link

sonarqubecloud bot commented Aug 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants