caTUstrophy / backend

Backend part for our catastrophe aid tool. Written in Go.
GNU General Public License v3.0
6 stars 3 forks source link

Add `Invalid` flag to matching model and cascade meaning of it #87

Closed numbleroot closed 8 years ago

numbleroot commented 8 years ago

For issue #73 it is needed to have an Invalid field in matching model in order to deny but not delete a matching. The field should get passed into the JSON representation of a matching. This would also create the opportunity for an admin to "delete" a matching in case a situation occurs that requires this. Internally, both actions (user denies matching, admin deletes matching) could use the same function that simply updates the matching to Invalid = true.

Therefore, invalid matches should be removed from /me/matchings as future changed user data would still be accesible via these calls.

On setting a matching to invalid, the concerned offer and request should have their Matched field set back to false.