mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user