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:
parent
7135a03654
commit
990ab32583
10 changed files with 58 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue