update notice: 更新 通告 資料 05-19 16:44
update notice: 更新 通告 資料
更新時間:2022-05-19 16:44:39
HTTP Request
POST: manager/notice/update/:id
URL Parameters
Parameter | Type | Status | Description |
---|---|---|---|
id | int | required | notices.id |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
data | object | optional | |
id | int | required | notices.id |
name | int | required | notices.name |
notice_cat | int | required | notices.notice_cat |
urgent | int | required | notices.urgent |
title_enHK | string | required | notices.title_enHK |
title_zhHK | string | required | notices.title_zhHK |
title_zhCN | string | required | notices.title_zhCN |
content_enHK | string | required | notices.content_enHK |
content_enHK | string | required | notices.content_enHK |
content_enHK | string | required | notices.content_enHK |
template_enHK | int | required | notices.template_enHK |
template_zhHK | int | required | notices.template_zhHK |
template_zhCN | int | required | notices.template_zhCN |
start_at | datetime | required | notices.start_at |
end_at | datetime | required | notices.end_at |
published_at | datetime | required | notices.published_at |
notice_type | int | required | notices.notice_type |
estate | int | required | notices.estate_id |
building | int | required | notices.building_id |
floor | int | required | notices.floor_id |
unit | int | required | notices.unit_id |
Response Structure
Parameter | Type | Status | Description |
---|---|---|---|
status | int | required | 0: 成功, 非0: 失敗 |
data | object | optional |
Example usage
Example #1
POST: manager/notice_type/update/1
Body
{
"data": {
"name": "notice_3",
"notice_cat": 1,
"urgent": 0,
"title_enHK": "notice_3",
"title_zhHK": "notice_3",
"title_zhCN": "notice_3",
"content_enHK": "notice_3",
"content_zhHK": "notice_3",
"content_zhCN": "notice_3",
"template_enHK": 900,
"template_zhHK": 900,
"template_zhCN": 900,
"start_at": "2021-09-09 12:00:00",
"end_at": "2021-09-10 12:00:00",
"published_at": "2021-09-09 11:59:59",
"notice_type": 1,
"estate": 1,
"building": 0,
"floor": 0,
"unit": 0
}
}
Response(200,status=0)
{
"status": 0
}
Example #2
POST: manager/notices/update/99999
Response(200,status=404 Not Found.)
{
"status": 404,
"error": "Not found."
}
Example #3
POST: manager/notices/update/invaildparams
Response(200,status=101)
{
"status": 101,
"error": "Invaild params."
}