update unit: 更新 單位 資料 05-19 16:44
update unit: 更新 單位 資料
更新時間:2022-05-19 16:44:39
HTTP Request
POST: manager/unit/update/:id
URL Parameters
Parameter | Type | Status | Description |
---|---|---|---|
id | int | required | units.id |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
data | object | optional | |
floor | int | optional | units.floor_id |
name | string | optional | units.name |
title_enHK | string | optional | units.title_enHK |
title_zhHK | string | optional | units.title_zhHK |
title_zhCN | string | optional | units.title_zhCN |
Response Structure
Parameter | Type | Status | Description |
---|---|---|---|
status | int | required | 0: 成功, 非0: 失敗 |
data | object | optional |
Example usage
Example #1
POST: manager/unit/update/1
Body
{
"data": {
"floor": 1,
"name": "unit_101",
"title_enHK": "101",
"title_zhHK": "101",
"title_zhCN": "101"
}
}
Response(200,status=0)
{
"status": 0
}
Example #2
POST: manager/units/update/99999
Response(200,status=404 Not Found.)
{
"status": 404,
"error": "Not found."
}
Example #3
POST: manager/units/update/invaildparams
Response(200,status=101)
{
"status": 101,
"error": "Invaild params."
}