feat: db uses asynclocalstorage set schema

feat: set user input related header in public route requests to identify schema
fix: small fixes
This commit is contained in:
Sérgio Salgado 2021-09-22 19:21:00 +01:00
parent 7135a03654
commit 990ab32583
10 changed files with 58 additions and 15 deletions

View file

@ -2,9 +2,7 @@ const { asyncLocalStorage, defaultStore } = require('./async-storage')
const computeSchema = (req, res, next) => {
const store = defaultStore()
asyncLocalStorage.run(store, () => {
next()
})
return asyncLocalStorage.run(store, () => next())
}
module.exports = computeSchema