@alemonjs/kook 2.1.6 → 2.1.7
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/lib/config.d.ts +1 -1
- package/lib/config.js +2 -13
- package/package.json +2 -2
package/lib/config.d.ts
CHANGED
package/lib/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getConfigValue,
|
|
1
|
+
import { getConfigValue, isMaster } from 'alemonjs';
|
|
2
2
|
|
|
3
3
|
const platform = 'kook';
|
|
4
4
|
const getKOOKConfig = () => {
|
|
@@ -6,18 +6,7 @@ const getKOOKConfig = () => {
|
|
|
6
6
|
return value[platform] || {};
|
|
7
7
|
};
|
|
8
8
|
const getMaster = (UserId) => {
|
|
9
|
-
|
|
10
|
-
const mainMasterKey = values.master_key || [];
|
|
11
|
-
const mainMasterId = values.master_id || [];
|
|
12
|
-
const config = getKOOKConfig();
|
|
13
|
-
const masterKey = config.master_key || [];
|
|
14
|
-
const masterId = config.master_id || [];
|
|
15
|
-
const UserKey = useUserHashKey({
|
|
16
|
-
Platform: platform,
|
|
17
|
-
UserId: UserId
|
|
18
|
-
});
|
|
19
|
-
const is = mainMasterKey.includes(UserKey) || mainMasterId.includes(UserId) || masterKey.includes(UserKey) || masterId.includes(UserId);
|
|
20
|
-
return [is, UserKey];
|
|
9
|
+
return isMaster(UserId, platform);
|
|
21
10
|
};
|
|
22
11
|
|
|
23
12
|
export { getKOOKConfig, getMaster, platform };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alemonjs/kook",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "kook platform connection",
|
|
5
5
|
"author": "lemonade",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"type": "git",
|
|
60
60
|
"url": "https://github.com/lemonade-lab/alemonjs.git"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "e50477125586204c6e56a8ecfe3391136f5fe74b"
|
|
63
63
|
}
|