Commit Graph

6 Commits (38987b77bb82089edf869dfc3b09e1e96625192a)

Author SHA1 Message Date
Syed Ali Shahbaz 38987b77bb
Swagger/schedules request and response examples (#257)
This PR adds request body and response body examples to swagger in
/schedules endpoint
Added for:
- [x] `/schedules/_post`
- [x] `/schedules/_get`
- [x] `/schedules/[id]/_get`
- [x] `/schedules/[id]/_post`
- [x] `/schedules/[id]/_patch`
2023-04-19 12:22:07 -07:00
zomars 464c283e0c Reverts oopsie 2023-03-10 12:01:46 -07:00
Syed Ali Shahbaz 8fc4eedf5f
Adds swagger for schedules (#247)
This PR updates swagger documentation for the Schedules endpoint
2023-03-10 22:33:41 +05:30
zomars 055699f612 Various import and type fixes 2022-11-25 06:58:21 -07:00
Omar López e3fa0e546b
Refactor schedule endpoints (#185) 2022-10-13 14:54:38 -06:00
Alex van Andel a506c7da33
Refactor + fix userIds filter (#179)
This fix means a behaviour change to GET calls. Instead of a JSON
payload, instead a filter param has been added to the URL itself. GET
payloads are very unexpected in API designs, even though supported.

* Todo write tests (with postman?)
* Turn isAdmin logic into common middleware

```bash
curl "http://localhost:3002/v1/schedules?apiKey=...&userId=2"
```

```bash
curl "http://localhost:3002/v1/schedules?apiKey=..." \
  -d '{"name":"Hello", "userId": 2}' \
  -H 'Content-Type: application/json'
```
2022-10-11 15:33:25 +01:00