Skip to content

Commit a719b7e

Browse files
authored
feat: update userInfoEx interface docs and update some comment. (#147)
1 parent 6136520 commit a719b7e

4 files changed

Lines changed: 172 additions & 2 deletions

File tree

docs/restapi/apis/userManagement/updateUserInfo.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hide_title: true
1111
</center>
1212

1313
### 简要描述
14-
- 修改用户的头像、昵称。
14+
- 修改用户的头像、昵称。(此接口已弃用,建议使用`update_user_info_ex`
1515
### 请求方式
1616
- `post`
1717
### 请求URL
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
sidebar_position: 9
3+
title: 修改用户信息ex
4+
hide_title: true
5+
---
6+
7+
<center>
8+
9+
## 修改用户信息ex
10+
11+
</center>
12+
13+
### 简要描述
14+
- 修改用户的头像、昵称。
15+
### 请求方式
16+
- `post`
17+
### 请求URL
18+
- `http://x.x.x.x:10002/user/update_user_info_ex`
19+
20+
21+
### Header
22+
|header名|示例值|选填|类型|说明|
23+
|:---- |:------- |:--- |---|------ |
24+
|operationID|1646445464564|必填|string|operationID用于全局链路追踪|
25+
|token|eyJhbxxxx3Xs|必填|string|管理员token|
26+
27+
28+
### 请求参数示例
29+
30+
31+
```json
32+
{
33+
"userInfo": {
34+
"userID": "2",
35+
"nickname": "alantestuid3",
36+
"faceURL": "1111111",
37+
"ex":"123"
38+
}
39+
}
40+
```
41+
|字段名|选填|类型|说明|
42+
|:---- |:------- |:--- |---|
43+
|userInfo|必填|object|用户信息|
44+
|userInfo.userID|必填|string|用户lD|
45+
|userInfo.nickname|选填|string|用户昵称|
46+
|userInfo.faceURL|选填|string|用户头像|
47+
|ex|选填|string|扩展字段|
48+
### 成功返回示例
49+
50+
51+
```json
52+
{
53+
"errCode": 0,
54+
"errMsg": "",
55+
"errDlt": ""
56+
}
57+
```
58+
### 成功返回示例的参数说明
59+
60+
61+
|参数名|类型|说明|
62+
|:---- |:------- |:--- |
63+
|errCode|int|错误码,0表示成功|
64+
|errMsg|string|错误简要信息,无错误时为空|
65+
|errDlt|errDlt|错误详细信息,无错误时为空|
66+
|data|object|通用数据对象,具体结构见下方|
67+
### 失败返回示例
68+
69+
70+
```json
71+
{
72+
"errCode": 1004,
73+
"errMsg": "RecordNotFoundError",
74+
"errDlt": ": [1004]RecordNotFoundError"
75+
}
76+
```
77+
### 失败返回示例的参数说明
78+
79+
80+
|参数名|类型|说明|
81+
|:---- |:------- |:--- |
82+
|errCode|int|错误码,具体查看全局错误码文档|
83+
|errMsg|string|错误简要信息|
84+
|errDlt|errDlt|错误详细信息|

i18n/en/docusaurus-plugin-content-docs-restapi/current/apis/userManagement/updateUserInfo.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hide_title: true
1111
</center>
1212

1313
### Brief Description
14-
- Update user's profile picture and nickname.
14+
- Update user's profile picture and nickname. (This interface is deprecated. Please use `update_user_info_ex` first.)
1515
### Request Method
1616
- `post`
1717
### Request URL
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
3+
sidebar_position: 9
4+
title: update_user_info_ex
5+
hide_title: true
6+
7+
---
8+
9+
<center>
10+
11+
## Update User Info Ex
12+
13+
</center>
14+
15+
### Brief Description
16+
- Modify user's avatar and nickname.
17+
18+
### Request Method
19+
- `POST`
20+
21+
### Request URL
22+
- `http://x.x.x.x:10002/user/update_user_info_ex`
23+
24+
### Header
25+
| Header Name | Example Value | Required | Type | Description |
26+
|:------------|:--------------|:---------|:-----|:------------|
27+
|operationID |1646445464564 |Required |string|operationID for global traceability|
28+
|token |eyJhbxxxx3Xs |Required |string|Admin token|
29+
30+
### Request Parameters Example
31+
32+
```json
33+
{
34+
"userInfo": {
35+
"userID": "2",
36+
"nickname": "alantestuid3",
37+
"faceURL": "1111111",
38+
"ex": "123"
39+
}
40+
}
41+
```
42+
43+
| Field Name | Required | Type | Description |
44+
|:-----------------|:---------|:-------|:--------------|
45+
|userInfo | Required | object | User information |
46+
|userInfo.userID | Required | string | User ID |
47+
|userInfo.nickname | Optional | string | User nickname |
48+
|userInfo.faceURL | Optional | string | User avatar |
49+
|ex | Optional | string | Extension field |
50+
51+
### Success Response Example
52+
53+
```json
54+
{
55+
"errCode": 0,
56+
"errMsg": "",
57+
"errDlt": ""
58+
}
59+
```
60+
61+
### Success Response Parameters Explanation
62+
63+
| Parameter Name | Type | Description |
64+
|:---------------|:-------|:------------|
65+
|errCode | int | Error code, 0 indicates success |
66+
|errMsg | string | Brief error message, empty if no error |
67+
|errDlt | string | Detailed error message, empty if no error |
68+
|data | object | Generic data object, specific structure below |
69+
70+
### Failure Response Example
71+
72+
```json
73+
{
74+
"errCode": 1004,
75+
"errMsg": "RecordNotFoundError",
76+
"errDlt": ": [1004]RecordNotFoundError"
77+
}
78+
```
79+
80+
### Failure Response Parameters Explanation
81+
82+
| Parameter Name | Type | Description |
83+
|:---------------|:-------|:------------|
84+
|errCode | int | Error code, refer to the global error code documentation |
85+
|errMsg | string | Brief error message |
86+
|errDlt | string | Detailed error message |

0 commit comments

Comments
 (0)