From 66bd5d2f7fd84eec39d69f4a8f5c435fc978804f Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Thu, 19 Mar 2026 17:14:20 +0000 Subject: Add site passwords --- web/command/handler/authenticate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/command/handler/authenticate.go') diff --git a/web/command/handler/authenticate.go b/web/command/handler/authenticate.go index 1c7d312..a463e7f 100644 --- a/web/command/handler/authenticate.go +++ b/web/command/handler/authenticate.go @@ -14,7 +14,7 @@ import ( func GetAuthenticate() func(http.ResponseWriter, *http.Request) { return ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) { - return html.AuthenticatePage(""), nil + return html.AuthenticateScrapbookPage(""), nil }) } @@ -22,20 +22,20 @@ func PostAuthenticate(mainConfig *config.MainConfig, authenticator *auth.Authent return func(w http.ResponseWriter, r *http.Request) { err := r.ParseForm() if err != nil { - html.AuthenticatePage(err.Error()).Render(w) + html.AuthenticateScrapbookPage(err.Error()).Render(w) return } token := r.Form.Get("token") if len(mainConfig.Command.Secret) == 0 || subtle.ConstantTimeCompare([]byte(token), []byte(mainConfig.Command.Secret)) != 1 { - html.AuthenticatePage("The secret key is incorrect").Render(w) + html.AuthenticateScrapbookPage("The secret key is incorrect").Render(w) return } jwt, err := authenticator.NewJwt() if err != nil { - html.AuthenticatePage(fmt.Errorf("Failed to create jwt: %w", err).Error()).Render(w) + html.AuthenticateScrapbookPage(fmt.Errorf("Failed to create jwt: %w", err).Error()).Render(w) return } -- cgit v1.2.3-70-g09d2