fix: allow deleting non existing flag
Attempt to fix #26
It's pretty hard to test if it actually works since I don't have multiple nodes to test, so sorry if the fix isn't correct 😕
Hi @Gladear , thank you for iterating on this.
I'd ask to please not commit --amend and force push. It blows away the PR history, and it makes it difficult to see what changed. You can simply add a new incremental commit and push.
Ok, I think this works in theory, thank you.
However, I don't think that the error from https://github.com/tompave/fun_with_flags_ui/issues/26 comes only from the delete "/flags/:name/boolean" endpoint you've modified. As I mentioned here, the problem is more widespread. I think that all endpoints need to switch to logic that ensures that String.to_existing_atom/1 doens't just rely on what's available in memory.
From the original message:
It's pretty hard to test if it actually works since I don't have multiple nodes to test, so sorry if the fix isn't correct
On the master branch of FWF I've added some instructions on how to run multiple nodes: https://github.com/tompave/fun_with_flags#working-with-pubsub-locally
But I don't think you need that. You can restart the FWF.UI app (iex -S mix) and go directly to a flag details page without first loading the homepage.