Skip to content

Commit

Permalink
fix(facade): rename configs of resource to master_data, namespace rem…
Browse files Browse the repository at this point in the history
…apping not required!
  • Loading branch information
Gerald Baulig committed Aug 21, 2024
1 parent c766148 commit 67fce15
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/facade/src/modules/master_data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import { createFacadeModuleFactory } from '../../utils.js';

export const resourceModule = createFacadeModuleFactory<ResourceConfig, ResourceModule>(namespace, (facade, config) => {
const resource = {
client: new ResourceSrvGrpcClient(config.config.client.address, {
...config.config.client,
logger: facade.logger,
})
client: new ResourceSrvGrpcClient(
config.config.client.address,
{
...config.config.client,
logger: facade.logger,
}
)
};

facade.addApolloService({
Expand All @@ -17,7 +20,7 @@ export const resourceModule = createFacadeModuleFactory<ResourceConfig, Resource
});

facade.koa.use(async (ctx, next) => {
ctx.resource = resource;
ctx.master_data = resource;
await next();
});
});

0 comments on commit 67fce15

Please sign in to comment.