From d084a07bb5189c4104709f225f9b9fda3b4e848e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 21 Apr 2025 23:50:07 +0200 Subject: [PATCH] chore(webui): various inconsequential fixes --- pkg/database/accounts.go | 2 +- pkg/webui/states.go | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/database/accounts.go b/pkg/database/accounts.go index 66e23ad..5f589c8 100644 --- a/pkg/database/accounts.go +++ b/pkg/database/accounts.go @@ -231,7 +231,7 @@ func (db *DB) SaveAccount(account *model.Account) error { account.PasswordReset, account.Id) if err != nil { - return fmt.Errorf("failed to update user id %s: %w", account.Id, err) + return fmt.Errorf("failed to update account id %s: %w", account.Id, err) } return nil } diff --git a/pkg/webui/states.go b/pkg/webui/states.go index 6c763ce..2f872cb 100644 --- a/pkg/webui/states.go +++ b/pkg/webui/states.go @@ -13,7 +13,6 @@ import ( ) type StatesPage struct { - ActiveTab int Page *Page Path string PathError bool @@ -55,8 +54,7 @@ func handleStatesPOST(db *database.DB) http.Handler { parsedStatePath, err := url.Parse(statePath) if err != nil || path.Clean(parsedStatePath.Path) != statePath || statePath[0] != '/' { render(w, statesTemplates, http.StatusBadRequest, StatesPage{ - ActiveTab: 1, - Page: makePage(r, &Page{Title: "New State", Section: "states"}), + Page: makePage(r, &Page{Title: "States", Section: "states"}), Path: statePath, PathError: true, States: states, @@ -81,8 +79,7 @@ func handleStatesPOST(db *database.DB) http.Handler { } if version == nil { render(w, statesTemplates, http.StatusBadRequest, StatesPage{ - ActiveTab: 1, - Page: makePage(r, &Page{Title: "New State", Section: "states"}), + Page: makePage(r, &Page{Title: "State", Section: "states"}), Path: statePath, PathDuplicate: true, States: states,