Skip to content

Add Backend support for Location Removal Requests

Julian Menzler requested to merge julian/removal_request_support into main
  • 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 the Location object that matches the stored location_id. It outputs a GeoJSON string, which includes the removal request's attributes inside the properties field
  • Adds the following functions to the Locations REST service

    • add_removal_request - storing a given removal request object to the locations_requests MongoDB collection
    • delete_removal_request
    • get_removal_requests_as_geojson
      1. retrieves all LocationRemovalRequest objects and associated Location objects from the DB
      2. automatically removes removal requests when there is no matching Location object
      3. returns a list of GeoJSON strings for the frontend, including Location and removal request details.
  • Refactors logger calls to use printf strings

Edited by Julian Menzler

Merge request reports