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
|
|
@ -38,7 +38,10 @@ const _task = (obj, opts, cb) => {
|
|||
})
|
||||
}
|
||||
|
||||
const getSchema = () => 'public'
|
||||
const getSchema = () => {
|
||||
const store = asyncLocalStorage.getStore() ?? defaultStore()
|
||||
return asyncLocalStorage.run(store, () => store.get('schema'))
|
||||
}
|
||||
const getDefaultSchema = () => 'ERROR_SCHEMA'
|
||||
|
||||
const searchPathWrapper = (t, cb) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue