@abtnode/core 1.16.24-beta-6975c2c0 → 1.16.24-beta-64150e24
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/states/user.js +25 -4
- package/lib/webhook/sender/wallet/index.js +6 -1
- package/package.json +21 -21
package/lib/states/user.js
CHANGED
|
@@ -188,7 +188,7 @@ class User extends ExtendBase {
|
|
|
188
188
|
// eslint-disable-next-line require-await
|
|
189
189
|
async getUsers({ query, sort, paging } = {}) {
|
|
190
190
|
const where = {};
|
|
191
|
-
const { approved, role, search, tags, includeTags } = query || {};
|
|
191
|
+
const { approved, role, search, tags, includeTags, includePassports } = query || {};
|
|
192
192
|
const shouldIncludeTag = (tags && tags.length) || includeTags;
|
|
193
193
|
|
|
194
194
|
if (isNullOrUndefined(approved) === false) {
|
|
@@ -224,18 +224,39 @@ class User extends ExtendBase {
|
|
|
224
224
|
if (!Object.keys(sorting).length) {
|
|
225
225
|
sorting.createdAt = -1;
|
|
226
226
|
}
|
|
227
|
+
const include = [];
|
|
228
|
+
if (shouldIncludeTag) {
|
|
229
|
+
include.push(this.getTagInclude(tags));
|
|
230
|
+
}
|
|
231
|
+
if (includePassports) {
|
|
232
|
+
include.push({
|
|
233
|
+
model: this.models.Passport,
|
|
234
|
+
as: 'passports',
|
|
235
|
+
});
|
|
236
|
+
}
|
|
227
237
|
|
|
228
|
-
return this.paginate({ where, include
|
|
238
|
+
return this.paginate({ where, include }, sorting, paging);
|
|
229
239
|
}
|
|
230
240
|
|
|
231
241
|
// eslint-disable-next-line require-await
|
|
232
242
|
async getUsersByDids({ dids, query }) {
|
|
233
|
-
const { approved, includeTags } = query || {};
|
|
243
|
+
const { approved, includeTags, includePassports } = query || {};
|
|
234
244
|
const condition = { did: dids };
|
|
235
245
|
if (isNullOrUndefined(approved) === false) {
|
|
236
246
|
condition.approved = !!approved;
|
|
237
247
|
}
|
|
238
|
-
|
|
248
|
+
const include = [];
|
|
249
|
+
if (includeTags) {
|
|
250
|
+
include.push(this.getTagInclude());
|
|
251
|
+
}
|
|
252
|
+
if (includePassports) {
|
|
253
|
+
include.push({
|
|
254
|
+
model: this.models.Passport,
|
|
255
|
+
as: 'passports',
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return this.find({ where: condition, include });
|
|
239
260
|
}
|
|
240
261
|
|
|
241
262
|
// eslint-disable-next-line require-await
|
|
@@ -11,6 +11,7 @@ class WalletSender extends BaseSender {
|
|
|
11
11
|
const sender = {
|
|
12
12
|
appDid: nodeInfo.did,
|
|
13
13
|
appSk: nodeInfo.sk,
|
|
14
|
+
type: 'server',
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
const message = {
|
|
@@ -18,7 +19,11 @@ class WalletSender extends BaseSender {
|
|
|
18
19
|
body: description,
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
const { users } = await node.getUsers({
|
|
22
|
+
const { users } = await node.getUsers({
|
|
23
|
+
teamDid: nodeInfo.did,
|
|
24
|
+
paging: { pageSize: 100 },
|
|
25
|
+
query: { includePassports: true },
|
|
26
|
+
});
|
|
22
27
|
const adminUsers = users
|
|
23
28
|
.filter(
|
|
24
29
|
(x) =>
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.24-beta-
|
|
6
|
+
"version": "1.16.24-beta-64150e24",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.24-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.24-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.24-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.24-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.24-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.24-beta-
|
|
28
|
-
"@abtnode/models": "1.16.24-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.24-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.24-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.24-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.24-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.24-beta-
|
|
34
|
-
"@abtnode/util": "1.16.24-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.24-beta-64150e24",
|
|
23
|
+
"@abtnode/auth": "1.16.24-beta-64150e24",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.24-beta-64150e24",
|
|
25
|
+
"@abtnode/constant": "1.16.24-beta-64150e24",
|
|
26
|
+
"@abtnode/cron": "1.16.24-beta-64150e24",
|
|
27
|
+
"@abtnode/logger": "1.16.24-beta-64150e24",
|
|
28
|
+
"@abtnode/models": "1.16.24-beta-64150e24",
|
|
29
|
+
"@abtnode/queue": "1.16.24-beta-64150e24",
|
|
30
|
+
"@abtnode/rbac": "1.16.24-beta-64150e24",
|
|
31
|
+
"@abtnode/router-provider": "1.16.24-beta-64150e24",
|
|
32
|
+
"@abtnode/static-server": "1.16.24-beta-64150e24",
|
|
33
|
+
"@abtnode/timemachine": "1.16.24-beta-64150e24",
|
|
34
|
+
"@abtnode/util": "1.16.24-beta-64150e24",
|
|
35
35
|
"@arcblock/did": "1.18.110",
|
|
36
36
|
"@arcblock/did-auth": "1.18.110",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.110",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.110",
|
|
44
44
|
"@arcblock/vc": "1.18.110",
|
|
45
|
-
"@blocklet/constant": "1.16.24-beta-
|
|
46
|
-
"@blocklet/env": "1.16.24-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.24-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.24-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.24-beta-
|
|
50
|
-
"@did-space/client": "^0.3.
|
|
45
|
+
"@blocklet/constant": "1.16.24-beta-64150e24",
|
|
46
|
+
"@blocklet/env": "1.16.24-beta-64150e24",
|
|
47
|
+
"@blocklet/meta": "1.16.24-beta-64150e24",
|
|
48
|
+
"@blocklet/resolver": "1.16.24-beta-64150e24",
|
|
49
|
+
"@blocklet/sdk": "1.16.24-beta-64150e24",
|
|
50
|
+
"@did-space/client": "^0.3.64",
|
|
51
51
|
"@fidm/x509": "^1.2.1",
|
|
52
52
|
"@ocap/mcrypto": "1.18.110",
|
|
53
53
|
"@ocap/util": "1.18.110",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"jest": "^29.7.0",
|
|
103
103
|
"unzipper": "^0.10.11"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "30c91a8e2790a0527ba336497f5032ba54ed4225"
|
|
106
106
|
}
|