nobt-io / api

Main-Backend of nobt.io.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow bills to be deleted

thomaseizinger opened this issue · comments

The API should allow to delete bills from a nobt, however, they should not be actually deleted from the DB but instead "marked" deleted with a flag or something like that. During the debt-calculation, these bills have to be filtered out.

Also, the API should advertise to the client that bills can be deleted. I would suggest adding a link to each bill's resource payload like this:

{
	"id": 3,
	"name": "Beer",
        // other properties
	"_links": {
		"delete": {
			"href": "..."
		}
	}
}

For now, this link is always present. Later on, we can change whether or not bills can be deleted by excluding the links under certain conditions (e.g. time-limit etc)