Add Backend support for Location Removal Requests
-
Adds model class
LocationRemovalRequest
, encapsulating the reporter's email, reason, location_id & timestamp-
to_dict
produces output to be stored in the database,from_dict
to read from the database -
to_geojson
takes theLocation
object that matches the stored location_id. It outputs a GeoJSON string, which includes the removal request's attributes inside theproperties
field
-
-
Adds the following functions to the Locations REST service
-
add_removal_request
- storing a given removal request object to thelocations_requests
MongoDB collection delete_removal_request
-
get_removal_requests_as_geojson
- retrieves all
LocationRemovalRequest
objects and associatedLocation
objects from the DB - automatically removes removal requests when there is no matching Location object
- returns a list of GeoJSON strings for the frontend, including Location and removal request details.
- retrieves all
-
-
Refactors
logger
calls to use printf strings
Edited by Julian Menzler