Closed tmcw closed 3 years ago
I did this intentionally but didn't update the spec yet....wasn't sure if returning the site IDs would be useful or not. Let me know what you prefer and I can make it happen...
Ideally it would return the new spot. Right now it's pretty tricky because the IDs I'm getting back from the database seem to be in arbitrary order, and I'm posting sites and then trying to figure out what's the new id of the site that I posted, so for every insert, I need do do a query and a bunch of data munging.
https://github.com/earthrise-media/plastics/blob/b70daa6a93201696e6d0c9d514a8c17f2fc4fadf/api/handler/site.go#L93-L101
This doesn't seem to match with
Instead of status 200, this returns 201, and instead of returning the created site, this returns an empty response.