Closed dimkir closed 5 years ago
This bug seems to apply in
On Lambda this error cannot happen, as each request will run in separate lambda container and reentry of multiple requests into middleware within same memory space cannot happen
But we get another issue:
Middleware is declared within server.js
which is outside of the scope of the (order-manager)
. This is why we cannot set global tenantId
variable there... (or at least this would be a very perverted way).
We still need to extract tenantId from each request within the bodies of the controller functions... (or maybe we can inject this value into request?)
This is fixed
Tenant Id needs to be extracted within body of each controller function!