I learned how to create and get user data.
However I wonder what is the proper way to manage the lifetime of user data when we need to modify it ?
Use Case :
I create data with my User -> doc ID1 is created.
The User plays a bit...
Now I want to update the data of my user. I can :
- Upload a new docID ( via User service using user data ). Problem : The old doc is not deleted.
- Keep the old doc ID, then Upload a new docID ( via User service using user data ). Then delete from storage the old docID. Problem : The old docID might still be kept in the user data, but the document will not be available anymore...
- Can I easily replace the content of a doc linked with the user ? Using User service / Storage Service ?
- Any other option ?
So I am wondering what is the proper way to update an existing user data...
Can I do it using only user service ? What is the proper flow ?