openMF / web-app

Mifos X Web App is the revamped version of the Mifos X Community App built on top of the Fineract Platform leveraging the popular Angular framework.
https://openmf.github.io/web-app/
Mozilla Public License 2.0
230 stars 533 forks source link

Searching for Client throws a 404 error #1893

Closed ichux closed 8 months ago

ichux commented 1 year ago

Description

Searching for Client throws a 404 error

Steps to Reproduce

Clicking on a running instance of Mifos X Web App to access clients (Institution > Clients) or browsing to

http://127.0.0.1:19090/#/clients throws a 404 error. On checking the query being sent to Fineract, below is what I saw

curl -u mifos:password 'http://127.0.0.1:19090/fineract-provider/api/v2/clients/search' \
-X POST -H 'Accept: application/json' -H 'Fineract-Platform-TenantId: default' \
-H 'Content-Type: application/json' --data-raw '{"request":{"text":""},"page":0,"size":50}'

On further analysis, it turns out that a non-existent api/v2 route is being called.

However, if one searches for the same thing by clicking on the search icon on the navbar and choosing the resource, Clients, then entering the search phrase, it works. The below is the request being sent

curl -u mifos:password 'http://127.0.0.1:19090/fineract-provider/api/v1/search?exactMatch=false&query=INSTANCEONE&resource=clients,clientIdentifiers' \
-H 'Accept: application/json' -H 'Fineract-Platform-TenantId: default'

Expected Behaviour

Post searches are supposed to return results or empty list but not throw a 404 error

Actual Behaviour

It's failing

Settings

Screenshot from 2023-11-08 11-43-37

PC-11-00 commented 10 months ago

It's working fine, both APIs are working on my local.

https://github.com/openMF/web-app/assets/76156941/9e22196c-f4b6-49bf-875c-837fe671b574