/todo/<pk:int> PUT - Thay đổi thông tin một todo
HTTP/1.1 PUT /api/v1/todo/<pk:int>
-
Permission:
everyone
-
Require Logged In:
true
-
Require:
status != "COMPLETE"
| Field |
Method |
Type |
Description |
Required |
| name |
PUT |
string |
tên task todo |
|
| description |
PUT |
string |
mô tả |
|
| status |
PUT |
string |
trạng thái của todo |
nếu có thì phải là ("NEW", "COMPLETE") |
| date_of_completion |
PUT |
string |
hạn hoàn thành todo |
theo format yyyy-mm-ddThh:mm |
| Field |
Type |
Description |
| status |
string |
Trạng thái |
| message |
string |
Thông báo chi tiết |
| data |
json |
Thông tin todo vừa thay đổi |
{
"status": "success",
"message": "update a todo successfully",
"data": {
"id": 3,
"name": "todo 5",
"description": "description todo 1",
"date_of_completion": "2021-12-30T12:30:00Z",
"status": "NEW",
"date_of_creation": "2021-06-30T12:06:09.926517Z",
"date_of_modification": "2021-07-01T09:24:22.554749Z",
"user_id": 1
}
}