chore(webui): various inconsequential fixes
All checks were successful
main / main (push) Successful in 1m49s
main / publish (push) Has been skipped
main / deploy (push) Has been skipped

This commit is contained in:
Julien Dessaux 2025-04-21 23:50:07 +02:00
parent 6fb2db436d
commit d084a07bb5
Signed by: adyxax
GPG key ID: F92E51B86E07177E
2 changed files with 3 additions and 6 deletions

View file

@ -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
}

View file

@ -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,