atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Remove generated resources on changing domain settings

Open joepio opened this issue 3 years ago • 0 comments

  • Start atomic-server on localhost
  • Start again, on some other domain
  • Search for string, see two /path endpoint resources

This happens because the Db.populate() command is ran twice in this scenario. We don't delete the outdated Endpoint resources.

This is related to https://github.com/atomicdata-dev/atomic-data-rust/issues/273

Possible solutions:

  • Keep track of which resources are generated. When running populate, check if earlier populate resources should be removed.
  • Don't store the local domain in resources - only use the part of the URL after the domain (confusingly also called path, by the way)

joepio avatar May 10 '22 09:05 joepio