Closed sellnat77 closed 4 years ago
@adamkendis @brodly Actually I think this endpoint works as is My POST body is
{
"startDate":"2019-01-01",
"endDate":"2019-12-31",
"ncList": ["SUNLAND-TUJUNGA NC", "HISTORIC HIGHLAND PARK NC"],
"requestTypes":["Homeless Encampment"]
}
And I get a mixture of both
Unless you disagree...i think this can be closed
I want to make sure this is a FE issue and not backend. Still doing tests and it appears the backend only sends back Sherman Oaks data regardless of what NC you send it.
Your body is formatted differently than what we have. For neighborhood councils, do you expect an array called ncList
? We are sending the array as councils
. Also we are sending dates formatted as MM/DD/YYYY
. What are you expecting?
Ahhhh yeah, you must be getting my defaults then...one sec
https://github.com/hackforla/311-data/blob/445bf8fffd3ea35da08db583362fb1845168403a/server/src/app.py#L105 If the endpoint doesn't get the right params, it's defaulting to Sherman oaks
Confirmed to be working as expected @brodly
Overview
Multiple IN statements are joined by AND's which means that if there are 2 the query will always resolve to []
Add some smarts in how we generate queries to join multiple IN statements with OR's instead of AND's