chore(webui): various inconsequential fixes
This commit is contained in:
parent
6fb2db436d
commit
d084a07bb5
2 changed files with 3 additions and 6 deletions
|
@ -231,7 +231,7 @@ func (db *DB) SaveAccount(account *model.Account) error {
|
||||||
account.PasswordReset,
|
account.PasswordReset,
|
||||||
account.Id)
|
account.Id)
|
||||||
if err != nil {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type StatesPage struct {
|
type StatesPage struct {
|
||||||
ActiveTab int
|
|
||||||
Page *Page
|
Page *Page
|
||||||
Path string
|
Path string
|
||||||
PathError bool
|
PathError bool
|
||||||
|
@ -55,8 +54,7 @@ func handleStatesPOST(db *database.DB) http.Handler {
|
||||||
parsedStatePath, err := url.Parse(statePath)
|
parsedStatePath, err := url.Parse(statePath)
|
||||||
if err != nil || path.Clean(parsedStatePath.Path) != statePath || statePath[0] != '/' {
|
if err != nil || path.Clean(parsedStatePath.Path) != statePath || statePath[0] != '/' {
|
||||||
render(w, statesTemplates, http.StatusBadRequest, StatesPage{
|
render(w, statesTemplates, http.StatusBadRequest, StatesPage{
|
||||||
ActiveTab: 1,
|
Page: makePage(r, &Page{Title: "States", Section: "states"}),
|
||||||
Page: makePage(r, &Page{Title: "New State", Section: "states"}),
|
|
||||||
Path: statePath,
|
Path: statePath,
|
||||||
PathError: true,
|
PathError: true,
|
||||||
States: states,
|
States: states,
|
||||||
|
@ -81,8 +79,7 @@ func handleStatesPOST(db *database.DB) http.Handler {
|
||||||
}
|
}
|
||||||
if version == nil {
|
if version == nil {
|
||||||
render(w, statesTemplates, http.StatusBadRequest, StatesPage{
|
render(w, statesTemplates, http.StatusBadRequest, StatesPage{
|
||||||
ActiveTab: 1,
|
Page: makePage(r, &Page{Title: "State", Section: "states"}),
|
||||||
Page: makePage(r, &Page{Title: "New State", Section: "states"}),
|
|
||||||
Path: statePath,
|
Path: statePath,
|
||||||
PathDuplicate: true,
|
PathDuplicate: true,
|
||||||
States: states,
|
States: states,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue