Skip to content

Commit 8927f4e

Browse files
committed
fix catalog list
1 parent f51f079 commit 8927f4e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/controllers/v3/OrgProductController.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@ export class OrgProductController extends Controller {
107107
};
108108
});
109109

110+
const ctx = this.keystone.createContext(request);
111+
110112
const promises = output.filter((env:any) => env.product.namespace).map(async (env: any) => {
111113
const nsAttributes = await getNamespaceAttributes(
114+
ctx,
112115
env.product.namespace
113116
);
114117
env.namespace = nsAttributes;
@@ -204,8 +207,8 @@ const list = gql`
204207
`;
205208

206209

207-
async function getNamespaceAttributes(ns: string) : Promise<OrgNamespace> {
208-
const prodEnv = await getGwaProductEnvironment(this.keystone.sudo(), false);
210+
async function getNamespaceAttributes(ctx: any, ns: string) : Promise<OrgNamespace> {
211+
const prodEnv = await getGwaProductEnvironment(ctx, false);
209212
const envConfig = prodEnv.issuerEnvConfig;
210213

211214
const svc = new NamespaceService(envConfig.issuerUrl);

0 commit comments

Comments
 (0)