From ab32caa49c4d869057150cbd622e335e4db9f1c5 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 19 Aug 2020 12:02:36 -0400 Subject: [PATCH] Include key names in Login page struct --- account.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/account.go b/account.go index fbe5ad0..96f5a3d 100644 --- a/account.go +++ b/account.go @@ -317,19 +317,19 @@ func viewLogin(app *App, w http.ResponseWriter, r *http.Request) error { OauthGitea bool GiteaDisplayName string }{ - pageForReq(app, r), - r.FormValue("to"), - template.HTML(""), - []template.HTML{}, - getTempInfo(app, "login-user", r, w), - app.Config().SlackOauth.ClientID != "", - app.Config().WriteAsOauth.ClientID != "", - app.Config().GitlabOauth.ClientID != "", - config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), - app.Config().GenericOauth.ClientID != "", - config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), - app.Config().GiteaOauth.ClientID != "", - config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), + StaticPage: pageForReq(app, r), + To: r.FormValue("to"), + Message: template.HTML(""), + Flashes: []template.HTML{}, + LoginUsername: getTempInfo(app, "login-user", r, w), + OauthSlack: app.Config().SlackOauth.ClientID != "", + OauthWriteAs: app.Config().WriteAsOauth.ClientID != "", + OauthGitlab: app.Config().GitlabOauth.ClientID != "", + GitlabDisplayName: config.OrDefaultString(app.Config().GenericOauth.DisplayName, genericOauthDisplayName), + OauthGeneric: app.Config().GenericOauth.ClientID != "", + OauthGenericDisplayName: config.OrDefaultString(app.Config().GitlabOauth.DisplayName, gitlabDisplayName), + OauthGitea: app.Config().GiteaOauth.ClientID != "", + GiteaDisplayName: config.OrDefaultString(app.Config().GiteaOauth.DisplayName, giteaDisplayName), } if earlyError != "" {