MockMode: made global in templates; increase bort of navbar in mock mode
This commit is contained in:
+11
-1
@@ -170,6 +170,14 @@ func (s *webpageRouter) serveTemplate(c *gin.Context) (response.Response, error)
|
||||
|
||||
r := c.Request
|
||||
ctx := r.Context()
|
||||
id := auth.GetIdentity(ctx)
|
||||
var mockMode bool
|
||||
if id.Account != nil {
|
||||
var err error
|
||||
if mockMode, err = s.accts.GetMockMode(ctx, id.Account.AccountID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
args := []any{
|
||||
"Request",
|
||||
@@ -183,10 +191,12 @@ func (s *webpageRouter) serveTemplate(c *gin.Context) (response.Response, error)
|
||||
s.accts.WithContext(ctx),
|
||||
"Etsy",
|
||||
s.etsy.WithContext(ctx),
|
||||
"MockMode",
|
||||
mockMode,
|
||||
|
||||
// auth tooling
|
||||
"Identity",
|
||||
auth.GetIdentity(ctx),
|
||||
id,
|
||||
"Auth",
|
||||
newTemplateAuthenticator(r),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user