update user: 更新 使用者 資料 12-13 15:16
update user: 更新 使用者 資料
更新時間:2022-12-13 15:16:10
如果要重置password, 請call auth/*(未有API),
如果要更改user role, 請call auth/*(未有API)
HTTP Request
POST: manager/user/update/:id
URL Parameters
Parameter | Type | Status | Description |
---|---|---|---|
id | int | required | users.id |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
data | object | optional | |
name | int | optional | users.name |
string | optional | users.email | |
first_name | string | optional | users.first_name |
last_name | string | optional | users.last_name |
tel | string | optional | users.tel |
Response Structure
Parameter | Type | Status | Description |
---|---|---|---|
status | int | required | 0: 成功, 非0: 失敗 |
data | object | optional |
Example usage
Example #1
POST: manager/user/update/1
Body
{
"data": {
"name": "SteveJobs",
"email": "Steve@Jobs.com",
"first_name": "Steve",
"last_name": "Jobs",
"tel": "12345678"
}
}
Response(200,status=0)
{
"status": 0
}
Example #2
POST: manager/users/update/99999
Response(200,status=404 Not Found.)
{
"status": 404,
"error": "Not found."
}
Example #3
POST: manager/users/update/invaildparams
Response(200,status=101)
{
"status": 101,
"error": "Invaild params."
}