Hi - I am creating a project in glitch but have run into difficulty in one aspect. Within my app you can delete members assessments (it’s a gym app). I have refreshed via console striaght away. It works fine locally but on glitch the delete assessment removes all assessments from the json file as opposed to just one - I have debugged but still cant find the problem . Anyone encounter anything like this before?
How are you updating the file? Could it be caused by the app being stopped and re-running itself midway through a file write?
You may have better luck storing the data in a small database like SQLite or Lowdb.
Do you think it could be a cacheing issue in the container? Is there anything left in the json file when this happens (for example, all the member assessments are gone but some other type of user record is left untouched) or is the entire file empty?