web: fix title not being loaded from config
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> #770
This commit is contained in:
		| @ -1,4 +1,4 @@ | ||||
| import { Configuration, Middleware, ResponseContext } from "authentik-api"; | ||||
| import { Config, Configuration, Middleware, ResponseContext, RootApi } from "authentik-api"; | ||||
| import { getCookie } from "../utils"; | ||||
| import { API_DRAWER_MIDDLEWARE } from "../elements/notifications/APIDrawer"; | ||||
| import { MessageMiddleware } from "../elements/messages/Middleware"; | ||||
| @ -12,6 +12,14 @@ export class LoggingMiddleware implements Middleware { | ||||
|  | ||||
| } | ||||
|  | ||||
| let globalConfigPromise: Promise<Config>; | ||||
| export function config(): Promise<Config> { | ||||
|     if (!globalConfigPromise) { | ||||
|         globalConfigPromise = new RootApi(DEFAULT_CONFIG).rootConfigList(); | ||||
|     } | ||||
|     return globalConfigPromise; | ||||
| } | ||||
|  | ||||
| export const DEFAULT_CONFIG = new Configuration({ | ||||
|     basePath: "/api/v2beta", | ||||
|     headers: { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer