feat: embed common client requests into the template html (#8076)

This should reduce the number of API requests a client makes
when loading the dashboard dramatically!
This commit is contained in:
Kyle Carberry
2023-06-18 13:57:27 -05:00
committed by GitHub
parent 2a10c9127f
commit 9df9ad4503
15 changed files with 409 additions and 184 deletions

View File

@ -66,6 +66,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
}()
api.AGPL.Options.SetUserGroups = api.setUserGroups
api.AGPL.SiteHandler.AppearanceFetcher = api.fetchAppearanceConfig
oauthConfigs := &httpmw.OAuth2Configs{
Github: options.GithubOAuth2Config,
@ -451,6 +452,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
}
api.entitlements = entitlements
api.AGPL.SiteHandler.Entitlements.Store(&entitlements)
return nil
}