ohcnetwork / life

Verified Crowd-Sourced Emergency Services Directory
https://life.coronasafe.network/
84 stars 56 forks source link

Incorrect state spelling (capital letters) results into an empty set #252

Closed jitendraag closed 3 years ago

jitendraag commented 3 years ago

Describe the bug curl -ik "https://life-pipeline.coronasafe.network/api/resources?resource=oxygen&state=Maharashtra&district=latur" Capital Maharashtra in query returns an empty response and not 404.

curl -ik "https://life-pipeline.coronasafe.network/api/resources?resource=oxygen&state=maharashtra&district=latur"

Small maharashtra works

To Reproduce Steps to reproduce the behavior:

  1. Use curl to see the issue

Expected behavior

  1. We should allow any case (lower / capital) for state and district names
  2. We should document that _ is used for states like uttar_pradesh

Screenshots NA

Desktop (please complete the following information): NA

Smartphone (please complete the following information): NA

Additional context NA

shrihari689 commented 3 years ago

1️⃣ Fixed πŸ™ˆ (as priority)

resources?resource=oxygen&state=Tamil Nadu&district=Chennai works βœ… resources?resource=Medicine&state=Tamil Nadu&district=Chennai works βœ… resources?resource=medicine&state=tamil_nadu&district=chennai works βœ… resources?resource=medicine&state=Tamil_nadu&district=Chennai works βœ…

2️⃣ Needs to be documented πŸ“ Will be doing that πŸŽ‰

Update: Added Basic Details here: https://life-pipeline.coronasafe.network/ Will plan for separate docs like Swagger for CareπŸ“

shrihari689 commented 3 years ago

πŸ“ Resolved