@rpcbase/client 0.111.0 → 0.112.0
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.
- package/auth/index.js +5 -2
- package/package.json +1 -1
- package/rts/getUseDocument.js +1 -1
package/auth/index.js
CHANGED
|
@@ -113,8 +113,11 @@ export const session_restrict = (ctx, next) => {
|
|
|
113
113
|
export const get_uid = () => __user_id
|
|
114
114
|
export const set_uid = (val) => {
|
|
115
115
|
__user_id = val
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
|
|
117
|
+
if (typeof val === "string") {
|
|
118
|
+
const tenant_id_prefix = val.slice(0, 8)
|
|
119
|
+
storage.setItem(uid_storage_key(tenant_id_prefix), val)
|
|
120
|
+
}
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
export const get_tenant_id = () => __tenant_id
|
package/package.json
CHANGED
package/rts/getUseDocument.js
CHANGED
|
@@ -9,7 +9,7 @@ const getUseDocument = (register_query) => (...args) => {
|
|
|
9
9
|
const res = useQuery(...args)
|
|
10
10
|
|
|
11
11
|
let data
|
|
12
|
-
// cache will always return [] when there are no matching documents, but we want null instead
|
|
12
|
+
// WARNING: cache will always return [] when there are no matching documents, but we want null instead
|
|
13
13
|
if (Array.isArray(res.data) && res.data.length === 0 && res.source === "cache") {
|
|
14
14
|
data = null
|
|
15
15
|
} else if (Array.isArray(res.data) && res.data.length > 0) {
|