loolabs / waterpark

Waterloo's social park
http://waterpark.loo-labs.vercel.app
ISC License
4 stars 0 forks source link

🗄️ Add washrooms endpoints to initial v2 API #212

Closed xujustinj closed 3 years ago

xujustinj commented 3 years ago

Purpose

Partial code checkin from v2/places. Now, the only un-checked-in code left in v2/places will be @KTong821 Python script changes.

Approach

For the most part, this is the exact same changes as places. However, we have a getWashroomById use case attached to /washrooms/:id. If the ID does not exist, then it will return an error.

Testing

Unit tests pass. Integration tests fail, as usual. (Currently Jest isn't properly parsing the integration test files.)

Endpoints were further tested on an empty DB. Verified that /washrooms/42 results in a "washroom not found" error.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/loo-labs/waterpark/9hFjPHgsFYWGdf9aLApQ168Ssbtm
✅ Preview: https://waterpark-git-washrooms-loo-labs.vercel.app