upperwal / covid19

Coronavirus Action Initiative
https://cov.social
6 stars 6 forks source link

FindFraud APi is not working #16

Closed siddharth-bulia closed 3 years ago

siddharth-bulia commented 3 years ago

Hey @upperwal I am Siddharth from covidverified.in I want to use your API to figure out a number is fraud or not. The API is giving a list of all the fraud numbers rather than telling if that specific number is fraud or not. Could you please check this?

API -

curl --location --request POST 'https://api.cov.social/v1/info/findFraud' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phone": <SEARCH_TERM>,
    "upi": <SEARCH_TERM>,
    "account_number": <SEARCH_TERM>
}'
upperwal commented 3 years ago

Hi @siddharth-bulia. Thanks for pointing it out. Recently we enabled regex on phone, account and UPI and due to that backend is searching for empty/undefined fields as well.

I modified the search API to have just one term "search". Feel free to open a PR if you think we can improve it further. I have kept the previous API to be backwards compatible.

Check out the Wiki page.

siddharth-bulia commented 3 years ago

Thanks! This is helpful!