@kne/fastify-account 1.0.0-alpha.11 → 1.0.0-alpha.12
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/README.md +69 -19
- package/libs/controllers/adminTenant.js +19 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npm i --save @kne/fastify-account
|
|
|
22
22
|
### API
|
|
23
23
|
|
|
24
24
|
---
|
|
25
|
-
title: "@kne/fastify-account v1.0.0-alpha.
|
|
25
|
+
title: "@kne/fastify-account v1.0.0-alpha.11"
|
|
26
26
|
language_tabs:
|
|
27
27
|
- shell: Shell
|
|
28
28
|
- http: HTTP
|
|
@@ -42,7 +42,7 @@ headingLevel: 2
|
|
|
42
42
|
|
|
43
43
|
<!-- Generator: Widdershins v4.0.1 -->
|
|
44
44
|
|
|
45
|
-
<h1 id="-kne-fastify-account">@kne/fastify-account v1.0.0-alpha.
|
|
45
|
+
<h1 id="-kne-fastify-account">@kne/fastify-account v1.0.0-alpha.11</h1>
|
|
46
46
|
|
|
47
47
|
> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
|
|
48
48
|
|
|
@@ -87,19 +87,8 @@ fastify的用户管理账号等实现
|
|
|
87
87
|
"type": "object",
|
|
88
88
|
"properties": {
|
|
89
89
|
"code": {
|
|
90
|
-
"type": "
|
|
91
|
-
|
|
92
|
-
"data": {
|
|
93
|
-
"type": "object",
|
|
94
|
-
"properties": {
|
|
95
|
-
"code": {
|
|
96
|
-
"type": "string",
|
|
97
|
-
"description": "验证码"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"msg": {
|
|
102
|
-
"type": "string"
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "验证码"
|
|
103
92
|
}
|
|
104
93
|
}
|
|
105
94
|
}
|
|
@@ -117,10 +106,7 @@ Status Code **200**
|
|
|
117
106
|
|
|
118
107
|
|Name|Type|Required|Restrictions|Description|
|
|
119
108
|
|---|---|---|---|---|
|
|
120
|
-
|» code|
|
|
121
|
-
|» data|object|false|none|none|
|
|
122
|
-
|»» code|string|false|none|验证码|
|
|
123
|
-
|» msg|string|false|none|none|
|
|
109
|
+
|» code|string|false|none|验证码|
|
|
124
110
|
|
|
125
111
|
<aside class="success">
|
|
126
112
|
This operation does not require authentication
|
|
@@ -440,6 +426,48 @@ This operation does not require authentication
|
|
|
440
426
|
This operation does not require authentication
|
|
441
427
|
</aside>
|
|
442
428
|
|
|
429
|
+
## post__api_v1_account_admin_setSuperAdmin
|
|
430
|
+
|
|
431
|
+
`POST /api/v1/account/admin/setSuperAdmin`
|
|
432
|
+
|
|
433
|
+
> Body parameter
|
|
434
|
+
|
|
435
|
+
```json
|
|
436
|
+
{
|
|
437
|
+
"type": "object",
|
|
438
|
+
"required": [
|
|
439
|
+
"status",
|
|
440
|
+
"userId"
|
|
441
|
+
],
|
|
442
|
+
"properties": {
|
|
443
|
+
"status": {
|
|
444
|
+
"type": "boolean"
|
|
445
|
+
},
|
|
446
|
+
"userId": {
|
|
447
|
+
"type": "string"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
<h3 id="post__api_v1_account_admin_setsuperadmin-parameters">Parameters</h3>
|
|
454
|
+
|
|
455
|
+
|Name|In|Type|Required|Description|
|
|
456
|
+
|---|---|---|---|---|
|
|
457
|
+
|body|body|object|true|none|
|
|
458
|
+
|» status|body|boolean|true|none|
|
|
459
|
+
|» userId|body|string|true|none|
|
|
460
|
+
|
|
461
|
+
<h3 id="post__api_v1_account_admin_setsuperadmin-responses">Responses</h3>
|
|
462
|
+
|
|
463
|
+
|Status|Meaning|Description|Schema|
|
|
464
|
+
|---|---|---|---|
|
|
465
|
+
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
|
|
466
|
+
|
|
467
|
+
<aside class="success">
|
|
468
|
+
This operation does not require authentication
|
|
469
|
+
</aside>
|
|
470
|
+
|
|
443
471
|
## post__api_v1_account_admin_addUser
|
|
444
472
|
|
|
445
473
|
`POST /api/v1/account/admin/addUser`
|
|
@@ -1997,6 +2025,28 @@ This operation does not require authentication
|
|
|
1997
2025
|
This operation does not require authentication
|
|
1998
2026
|
</aside>
|
|
1999
2027
|
|
|
2028
|
+
## get__api_v1_account_tenant_getTenantUserList
|
|
2029
|
+
|
|
2030
|
+
`GET /api/v1/account/tenant/getTenantUserList`
|
|
2031
|
+
|
|
2032
|
+
<h3 id="get__api_v1_account_tenant_gettenantuserlist-parameters">Parameters</h3>
|
|
2033
|
+
|
|
2034
|
+
|Name|In|Type|Required|Description|
|
|
2035
|
+
|---|---|---|---|---|
|
|
2036
|
+
|filter|query|object|false|none|
|
|
2037
|
+
|currentPage|query|number|false|none|
|
|
2038
|
+
|perPage|query|number|false|none|
|
|
2039
|
+
|
|
2040
|
+
<h3 id="get__api_v1_account_tenant_gettenantuserlist-responses">Responses</h3>
|
|
2041
|
+
|
|
2042
|
+
|Status|Meaning|Description|Schema|
|
|
2043
|
+
|---|---|---|---|
|
|
2044
|
+
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
|
|
2045
|
+
|
|
2046
|
+
<aside class="success">
|
|
2047
|
+
This operation does not require authentication
|
|
2048
|
+
</aside>
|
|
2049
|
+
|
|
2000
2050
|
## get__api_v1_account_tenant_orgList
|
|
2001
2051
|
|
|
2002
2052
|
`GET /api/v1/account/tenant/orgList`
|
|
@@ -201,14 +201,30 @@ module.exports = fp(async (fastify, options) => {
|
|
|
201
201
|
query: {
|
|
202
202
|
type: 'object',
|
|
203
203
|
properties: {
|
|
204
|
-
tenantId: { type: 'string' }
|
|
204
|
+
tenantId: { type: 'string' },
|
|
205
|
+
filter: {
|
|
206
|
+
type: 'object',
|
|
207
|
+
properties: {
|
|
208
|
+
name: { type: 'string' }
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
currentPage: { type: 'number' },
|
|
212
|
+
perPage: { type: 'number' }
|
|
205
213
|
}
|
|
206
214
|
}
|
|
207
215
|
}
|
|
208
216
|
},
|
|
209
217
|
async request => {
|
|
210
|
-
const { tenantId } =
|
|
211
|
-
|
|
218
|
+
const { filter, tenantId, currentPage, perPage } = Object.assign(
|
|
219
|
+
{},
|
|
220
|
+
{
|
|
221
|
+
filter: {},
|
|
222
|
+
currentPage: 1,
|
|
223
|
+
perPage: 20
|
|
224
|
+
},
|
|
225
|
+
request.query
|
|
226
|
+
);
|
|
227
|
+
return await services.tenantUser.getTenantUserList({ tenantId, filter, currentPage, perPage });
|
|
212
228
|
}
|
|
213
229
|
);
|
|
214
230
|
|