Skip to content

Commit

Permalink
all: imp i18n, names
Browse files Browse the repository at this point in the history
  • Loading branch information
ainar-g committed Oct 5, 2023
1 parent a7874f5 commit f88dfc9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/__locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
"parental_control": "Parental Control",
"safe_browsing": "Safe Browsing",
"served_from_cache": "{{value}} <i>(served from cache)</i>",
"form_error_password_length": "Password must be at least {{min}} and at most {{max}} characters long",
"form_error_password_length": "Password must {{min}} to {{max}} characters long",
"anonymizer_notification": "<0>Note:</0> IP anonymization is enabled. You can disable it in <1>General settings</1>.",
"confirm_dns_cache_clear": "Are you sure you want to clear DNS cache?",
"cache_cleared": "DNS cache successfully cleared",
Expand Down
4 changes: 2 additions & 2 deletions internal/home/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ func optionalAuthHandler(handler http.Handler) http.Handler {
return &authHandler{handler}
}

// UserAdd adds a new user with the given password.
func (a *Auth) UserAdd(u *webUser, password string) (err error) {
// Add adds a new user with the given password.
func (a *Auth) Add(u *webUser, password string) (err error) {
if len(password) == 0 {
return errors.Error("empty password")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/home/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestAuth(t *testing.T) {
s := session{}

user := webUser{Name: "name"}
err := a.UserAdd(&user, "password")
err := a.Add(&user, "password")
require.NoError(t, err)

assert.Equal(t, checkSessionNotFound, a.checkSession("notfound"))
Expand Down
2 changes: 1 addition & 1 deletion internal/home/controlinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (web *webAPI) handleInstallConfigure(w http.ResponseWriter, r *http.Request
u := &webUser{
Name: req.Username,
}
err = Context.auth.UserAdd(u, req.Password)
err = Context.auth.Add(u, req.Password)
if err != nil {
Context.firstRun = true
copyInstallSettings(config, curConfig)
Expand Down

0 comments on commit f88dfc9

Please sign in to comment.