Created
October 1, 2025 22:10
-
-
Save noelworden/0c6d7caf112c4161d8b729fbaf8c770d to your computer and use it in GitHub Desktop.
#blog_snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defp set_other_secret(_) do | |
| original_config = Application.get_env(:my_app, MyApp.Example) | |
| hash = generate_fake_hash() | |
| updated_config = Keyword.put(original_config, :other_secret, hash) | |
| Application.put_env(:my_app, MyApp.Example, updated_config) | |
| on_exit(fn -> | |
| Application.put_env(:my_app, MyApp.Example, original_config) | |
| end) | |
| {:ok, other_secret: hash} | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment