Skip to content

Commit 595d9f1

Browse files
committed
Fix context initialization and imports in services to improve data handling and code consistency
1 parent be0e64b commit 595d9f1

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

projects/lib/portal-options/services/crd-gateway-kcp-patch-resolver.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class CrdGatewayKcpPatchResolver {
3535
const kcpPath = `${kcpRootOrgsPath}:${org}${entityKcpPath}`;
3636
this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);
3737

38-
if (!nextNode.context.kcpPath) {
38+
if (nextNode.context && !nextNode.context.kcpPath) {
3939
nextNode.context.kcpPath = kcpPath;
4040
}
4141
return kcpPath;

projects/lib/portal-options/services/custom-global-nodes.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export class CustomGlobalNodesServiceImpl implements CustomGlobalNodesService {
4040
defineEntity: {
4141
id: 'user',
4242
},
43-
context: {} as PortalNodeContext,
43+
context: {
44+
userId: ':userId',
45+
} as PortalNodeContext,
4446
children: [
4547
{
4648
pathSegment: 'overview',

projects/lib/services/resource/resource.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import {
1515
} from '@platform-mesh/portal-ui-lib/utils';
1616
import { gql } from 'apollo-angular';
1717
import * as gqlBuilder from 'gql-query-builder';
18-
import { EMPTY, Observable } from 'rxjs';
1918
import VariableOptions from 'gql-query-builder/build/VariableOptions';
19+
import { EMPTY, Observable } from 'rxjs';
2020
import { catchError, map } from 'rxjs/operators';
2121

2222
interface ResourceResponseError extends Record<string, any> {

0 commit comments

Comments
 (0)