File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,19 @@ import {
8
8
UMB_NOTIFICATION_HEADER ,
9
9
} from '@umbraco-cms/backoffice/notification' ;
10
10
11
+ /**
12
+ * Controller that adds interceptors to the OpenAPI client
13
+ */
11
14
export class UmbApiInterceptorController extends UmbControllerBase {
12
15
constructor ( host : UmbControllerHost ) {
13
16
super ( host ) ;
14
- this . #addApiInterceptor ( ) ;
17
+ this . #addUmbNotificationsInterceptor ( ) ;
15
18
}
16
19
17
- #addApiInterceptor( ) {
20
+ /**
21
+ * Interceptor which takes in the umb-notifications and displays the notifications, if any.
22
+ */
23
+ #addUmbNotificationsInterceptor( ) {
18
24
OpenAPI . interceptors . response . use ( ( response ) => {
19
25
const umbNotifications = response . headers . get ( UMB_NOTIFICATION_HEADER ) ;
20
26
if ( ! umbNotifications ) return response ;
You can’t perform that action at this time.
0 commit comments