Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

CreateLayers: Backend Tasks #1336

Open
3 of 7 tasks
danielsteinkogler opened this issue Apr 23, 2024 · 2 comments
Open
3 of 7 tasks

CreateLayers: Backend Tasks #1336

danielsteinkogler opened this issue Apr 23, 2024 · 2 comments
Assignees

Comments

@danielsteinkogler
Copy link
Contributor

danielsteinkogler commented Apr 23, 2024

Currently we have Endpoints for creating and deleting layers. However, there are some tasks to do:

  • order index of layer within map has to be added to database
  • if a layer is deleted, it should only be a soft delete so that it can be easily restored (@markus2330 please correct us if this is not intended).
  • Change create layer: don't include map_id in the dto and in the path.

Endpoints and actions

  • Create action for creating layer
  • Create action for deleting layer
  • Create endpoint and action for renaming layer (PUT /maps/<map_id>/layers/<layer_id>/name)
  • Create endpoint and action for changing order of layer (PUT /maps/<map_id>/layers/order)
@danielsteinkogler
Copy link
Contributor Author

@markus2330 jannis and I discussed the needs for the backend concerning the create layers usecase and documented the tasks here in this issue.

@horenso
Copy link
Contributor

horenso commented Apr 23, 2024

@markus2330 since I'm touching layers in a migration, do we need is_alternative still?

We also talks a bit about soft deletion of layers, what do you think about

DELETE /maps/<map_id>/layers/<layer_id> sets a field marked_for_deletion: Date, which is set for 30 days in advance. Then a crone job deletes all marked layers after 30 days.

Thoughts for the future: Even building some UI for restoring would be possible. If you like the idea I'll write a usecase for soft-deletion of layers and maps.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: In Progress
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants