feat: allow configuring settings #6
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/stateless-uptime-kuma#6
Loading…
Reference in a new issue
No description provided.
Delete branch "lukegb/stateless-uptime-kuma:settings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This allows setting a settings attrset in the module, which will then
change that setting to the specified value. This is particularly useful
for e.g. the
entryPage
setting, which you can then make set to aparticular value.
There's an escape hatch for string-valued secrets which live in the
settings, like the Steam API key: string-valued settings can be
specified by using the __FILE suffix on the setting name (e.g.
steamAPIKey__FILE) and then specifying the path to a file instead.
The content of that file will be used as the setting instead.
Looks good to me !
@ -49,0 +55,4 @@
# We need all of the arguments; settings are saved all at once.
# We take any settings that are not explicitly set back from the server.
for k, v in old.items():
if k not in new.kwargs:
nitpick(non blocking):
new.kwargs.setdefault(k, v)
But I want to rewrite this file anyway