@@ -3,6 +3,7 @@ import type { UmbAppErrorElement } from './app-error.element.js';
3
3
import { UmbAppContext } from './app.context.js' ;
4
4
import { UmbServerConnection } from './server-connection.js' ;
5
5
import { UmbAppAuthController } from './app-auth.controller.js' ;
6
+ import { UmbApiInterceptorController } from './api-interceptor.controller.js' ;
6
7
import type { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth' ;
7
8
import { UmbAuthContext } from '@umbraco-cms/backoffice/auth' ;
8
9
import { css , html , customElement , property } from '@umbraco-cms/backoffice/external/lit' ;
@@ -19,12 +20,6 @@ import {
19
20
} from '@umbraco-cms/backoffice/extension-registry' ;
20
21
import { filter , first , firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs' ;
21
22
import { hasOwnOpener , retrieveStoredPath } from '@umbraco-cms/backoffice/utils' ;
22
- import {
23
- extractUmbNotificationColor ,
24
- isUmbNotifications ,
25
- UMB_NOTIFICATION_CONTEXT ,
26
- UMB_NOTIFICATION_HEADER ,
27
- } from '@umbraco-cms/backoffice/notification' ;
28
23
29
24
@customElement ( 'umb-app' )
30
25
export class UmbAppElement extends UmbLitElement {
@@ -152,7 +147,8 @@ export class UmbAppElement extends UmbLitElement {
152
147
super ( ) ;
153
148
154
149
OpenAPI . BASE = window . location . origin ;
155
- this . #attachApiInterceptor( ) ;
150
+
151
+ new UmbApiInterceptorController ( this ) ;
156
152
157
153
new UmbBundleExtensionInitializer ( this , umbExtensionsRegistry ) ;
158
154
@@ -218,6 +214,7 @@ export class UmbAppElement extends UmbLitElement {
218
214
}
219
215
}
220
216
217
+ /*
221
218
#attachApiInterceptor() {
222
219
OpenAPI.interceptors.response.use((response) => {
223
220
const umbNotifications = response.headers.get(UMB_NOTIFICATION_HEADER);
@@ -249,6 +246,7 @@ export class UmbAppElement extends UmbLitElement {
249
246
return newResponse;
250
247
});
251
248
}
249
+ */
252
250
253
251
// TODO: move set initial auth state into auth context
254
252
async #setAuthStatus( ) {
0 commit comments