diff options
| author | ivar <i@oiee.no> | 2026-04-04 16:34:46 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-04-04 16:34:46 +0200 |
| commit | a6355e7a6530af3335c4cd8af05f1e9c8b978169 (patch) | |
| tree | c9d920d1e996ef1c42d3455825731598df6b56c2 /internal/admin/auth | |
| parent | 8a093aacd162d3fd9f142b53aab9edfa061fd66a (diff) | |
| download | nebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.tar.xz nebbet.no-a6355e7a6530af3335c4cd8af05f1e9c8b978169.zip | |
.
Diffstat (limited to 'internal/admin/auth')
| -rw-r--r-- | internal/admin/auth/auth.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/admin/auth/auth.go b/internal/admin/auth/auth.go index b0de7d9..33f13bc 100644 --- a/internal/admin/auth/auth.go +++ b/internal/admin/auth/auth.go @@ -25,6 +25,9 @@ func (a *Auth) AddUser(username string) error { if err != nil && !os.IsNotExist(err) { return err } + if users == nil { + users = make(map[string]string) + } if _, exists := users[username]; exists { return fmt.Errorf("user %q already exists", username) } |
