codeforpdx/dwellinglybackend

Fix tenant archiving logic

NickSchimek opened this issue · 0 comments

Archiving a tenant should NOT be on a toggle switch. When the frontend hits the API with a request it should be deterministic. Currently the backend logic is written in a way that it expects the frontend to know the state of the backend. The update (PUT) action could handle this, but then the return message will be different.

To keep the response the same the delete method should be deleted/modified and replaced with deterministic logic. I believe there are a few different ways this could be done, but basically we want the frontend to be able to make a request and know for certain that they are archiving a tenant even if the tenant is already archived, as it is now they could inadvertently unarchive a tenant when they want to archive a tenant.

Whoever picks this up, Let me know what implementation you think is a good option and we can discuss, or if you need me to provide a couple different options then I can do that too.