Closed keawade closed 4 years ago
This gets into cascading deletes, which I don't like the idea of, but is probably needed here.
https://docs.mongodb.com/v3.2/reference/method/db.collection.update/
Seems like the way to go here...
To add to this...
Do we want a hard delete, or do we want to mark a user as deleted, which would give them the option of recovering their account within a time frame?
Probably hard delete? At least for 1.0. We can save the soft delete for later if we care.
I think soft-delete is actually easier... Because then I don't have to do a cascading delete.
Isn't a soft delete just a delayed and potentially reversible hard delete?
Basically, I'd add a Boolean
flag on the user that was isDeleted
, and filter on it.
Sure but you still have to actually delete it.
Do you?
As far as anything else is concerned, your account is gone, but you can reactivate it.
You don't have too, but we probably should.
Would allow a user to delete their account.
Would need to go through the deleting user's
following
collection and unfollow each user so the deleting user will be removed from the other user'sfollowers
collection.