Skip to content

Pv/retain bbox intersects parameters #215

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

Merged
merged 5 commits into from
Mar 7, 2022

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Mar 7, 2022

Related Issue(s):

Proposed Changes:

  1. fix next/prev pagination links to have bbox parameter in them if the request had it (previously, the bbox was converted to an intersects in the links)
  2. fix bbox validation to return 400 error for invalid bbox

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@philvarner philvarner requested a review from matthewhanson March 7, 2022 16:25
@philvarner philvarner force-pushed the pv/retain-bbox-intersects-parameters branch from 5e627ca to a8071fc Compare March 7, 2022 16:25
@philvarner philvarner marked this pull request as ready for review March 7, 2022 16:25
res.sendStatus(409)
} else {
next(error)
const itemRes = await api.getItem(collectionId, itemId, es, req.endpoint)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

validate the item exists for a put rather than just the collection (should have been pulled into another PR, but here we are)

@@ -67,17 +67,6 @@ test('POST /collections/:collectionId/items', async (t) => {
t.assert(response.headers['location'].endsWith(`/collections/${collectionId}/items/${itemId}`))
t.is(response.body, 'Created')

// now test mismatched collection ids, while we wait a second for our item propagate
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this had been pulled into another test, but not deleted here.

@@ -77,12 +77,12 @@ test('PUT /collections/:collectionId/items/:itemId', async (t) => {
test('PUT /collections/:collectionId/items/:itemId for a non-existent collection or id returns 404"', async (t) => {
const { collectionId } = t.context

t.is((await t.context.api.client.patch(
t.is((await t.context.api.client.put(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

missed updating these tests when copied the patch tests to put tests.

@philvarner philvarner merged commit 3009d83 into main Mar 7, 2022
@philvarner philvarner deleted the pv/retain-bbox-intersects-parameters branch March 7, 2022 18:38
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