Loading
Add alias to annotation routes
closes #274 (closed)
To be more compliant with STAC, the collectionID (and sometimes the itemID) were needed in the API routes even if they were not really useful.
This MR adds aliases to some routes:
-
GET /api/collections/:collectionId/items/:itemIdis equivalent toGET /api/pictures/:picId -
GET /api/collections/:collectionId/items/:itemId/annotationsis equivalent toGET /api/pictures/:itemId/annotations -
POST /api/collections/:collectionId/items/:itemId/annotationsis equivalent toPOST /api/pictures/:itemId/annotations -
GET /api/collections/:collectionId/items/:itemId/annotations/:annotationIdis equivalent toGET /annotations/:annotationId -
PATCH /api/collections/:collectionId/items/:itemId/annotations/:annotationIdis equivalent toPATCH /annotations/:annotationId
Note that I did not use redirect as it won't work with post/patch, so I added real routes instead to be coherent
Edited by antoine-de