littermap / littermap-aws-backend

Cloud-native backend for the Litter Map application -- (Join us on: https://discord.gg/JvEQMSQaYr)
https://littermap.com
GNU Affero General Public License v3.0
3 stars 2 forks source link

Implement API endpoint for updating a location's information #15

Open specious opened 2 years ago

specious commented 2 years ago

There exist endpoints to add a location or retrieve a location's details.

Add an API endpoint that will update an existing location's details:

PUT /id/{id}

{
  "description": "Edited description",
  "level": 99,
  "images": [
    "f1d73d68af0bc0aa4d9576c5",
    "e5e40b90f78cd4959d1808db",
    "e8a88bb6f4d420a8517965d2"
  ]
}

To successfully update a location one must be a logged in owner of that location or an admin with proper permissions.