@bootloader/context 1.0.17 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +2 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -40,7 +40,8 @@ class Context {
40
40
  return (req, res, next) => {
41
41
  this.run(async () => {
42
42
  let requestContext = request.context(req);
43
- let tenant = requestContext.headerOrParam('tnt');
43
+ //console.log("req.context", req.context);
44
+ let tenant = req.context || requestContext.headerOrParam('tnt');
44
45
  let traceId = requestContext.headerOrParam('x-trace-id');
45
46
  await fun(this.useDefaults({ tenant, traceId }));
46
47
  next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootloader/context",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {