Implement API endpoint for deleting a location:
The lambda function should check that the caller has sufficient permission to delete the location based on the current session.
A signed in user should be able to delete their own location and so should an admin with sufficient permissions.
The location shouldn't be removed from the database, but rather simply be marked as deleted, so that it will then be easy to make it possible to view deleted locations and to undelete them. In accordance with this advancement, the logic for retrieving locations within a geographic area should be adjusted to return by default only locations that have not been deleted.
Since the location will remain in the database, so should all the media files associated with that location remain in the media store.
Implement API endpoint for deleting a location:
The lambda function should check that the caller has sufficient permission to delete the location based on the current session.
A signed in user should be able to delete their own location and so should an admin with sufficient permissions.
The location shouldn't be removed from the database, but rather simply be marked as deleted, so that it will then be easy to make it possible to view deleted locations and to undelete them. In accordance with this advancement, the logic for retrieving locations within a geographic area should be adjusted to return by default only locations that have not been deleted.
Since the location will remain in the database, so should all the media files associated with that location remain in the media store.