Open thinhngo opened 6 years ago
Here's where I landed on this. The POST/PATCH/PUT bodies look something like this:
{
"id": 123, // Or no id if we're POSTing
"title": "Homeroom",
"description": "",
"start": "2018-04-20T13:29:29Z",
"end": "2018-04-20T14:29:30Z",
"location": {
"latitude": "37.828600",
"longitude": "-122.260000",
"query": "Homeroom!"
},
"required_tools": [
{
"tool": 4,
"quantity": 3
},
{
"tool": 5,
"quantity": 3
}
]
}
This is required by the React frontend after a cleanup has been created. Here's my strawman:
POST /api/v1/cleanups/[cleanupId]/tools
POST body would include this JSON:
It would also be nice to be able to add cleanups to the cleanup JSON body. This might look something like: