Simplify availibility request/response
This commit is contained in:
parent
c4ebcbb9bd
commit
ce2c735156
@ -278,7 +278,7 @@ A json object for the deleted meeting with `message`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"message": "Meeting with id f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted."
|
"message": "Meeting with id f86983db-955e-43b8-be3e-bc92bbeb9b43 was successfully deleted."
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -532,8 +532,7 @@ A json object for the deleted participant with `message`.
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
{
|
"message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 was successfully deleted."
|
||||||
"message": "Meeting with id 1-f86983db-955e-43b8-be3e-bc92bbeb9b43 successfully deleted."
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -592,13 +591,11 @@ A json object for the possible date to delete with `id`.
|
|||||||
|
|
||||||
##### Response `200`
|
##### Response `200`
|
||||||
|
|
||||||
A json object for the deleted possible date with `id`, `meeting_id` and `possible_date`.
|
A json object for the deleted possible date with `message`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": 12,
|
"message": "Possible date with id 12 was successfully deleted."
|
||||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
|
||||||
"possible_date": "2020-02-18"
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -627,76 +624,54 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
|
|||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"participant_id": 5,
|
"account_id": 5,
|
||||||
|
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43"
|
||||||
"possible_date_id": 21,
|
"possible_date_id": 21,
|
||||||
"intervals": [{
|
|
||||||
"preference": 0,
|
"preference": 0,
|
||||||
"start_time": "2021-06-25 09:00:00",
|
"start_time": "2021-06-25 09:00:00",
|
||||||
"end_time": "2021-06-25 13:00:00",
|
"end_time": "2021-06-25 13:00:00",
|
||||||
"timezone": "Europe/Brussels"
|
"timezone": "Europe/Brussels"
|
||||||
},
|
|
||||||
{
|
|
||||||
"preference": 1,
|
|
||||||
"start_time": "2021-06-25 15:00:00",
|
|
||||||
"end_time": "2021-06-25 20:00:00",
|
|
||||||
"timezone": "Europe/Brussels"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Response `201`
|
##### Response `201`
|
||||||
|
|
||||||
A json object with the availibility added with **`id`**, **`participant_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**.
|
A json object with the availibility added with **`id`**, **`account_id`**, **`meeting_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"id": 1
|
"id": 1
|
||||||
"participant_id": 5,
|
"account_id": 5,
|
||||||
|
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43"
|
||||||
"possible_date_id": 21,
|
"possible_date_id": 21,
|
||||||
"intervals": [{
|
|
||||||
"id": 45,
|
|
||||||
"preference": 0,
|
"preference": 0,
|
||||||
"start_time": "2021-06-25 09:00:00",
|
"start_time": "2021-06-25 09:00:00",
|
||||||
"end_time": "2021-06-25 20:00:00",
|
"end_time": "2021-06-25 13:00:00",
|
||||||
"timezone": "Europe/Brussels"
|
"timezone": "Europe/Brussels"
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 46,
|
|
||||||
"preference": 1,
|
|
||||||
"start_time": "2021-06-25 09:00:00",
|
|
||||||
"end_time": "2021-06-25 20:00:00",
|
|
||||||
"timezone": "Europe/Brussels"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Delete availibility for a possible date
|
#### Delete an availibility
|
||||||
|
|
||||||
**`DELETE /api/availibility/:id`**
|
**`DELETE /api/availibility/:id`**
|
||||||
|
|
||||||
##### Request
|
##### Request
|
||||||
|
|
||||||
A json object for the availibility to delete with **`participant_id`** and **`possible_date_id`**.
|
A json object for the availibility to delete with **`token`**.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"participant_id": 5,
|
"token": "bbeb9b43-fzefzef-zefdhffg-zgze"
|
||||||
"possible_date_id": 21
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Response `200`
|
##### Response `200`
|
||||||
|
|
||||||
A json object for the deleted availibility with status code and message.
|
A json object for the deleted availibility with `message`.
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"data": {
|
"message": "Availibility with id 12 was successfully deleted."
|
||||||
"participant_username": "José",
|
|
||||||
"possible_date": "2020-05-12"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user