ill-bronzeI
Refine3y ago
5 replies
ill-bronze

After changing the data source URL, I get an error and cannot retrieve the data.

Nice to meet you.
I have a question that I am unable to resolve.

We are currently starting to create an admin page in our local development environment.
When I changed the API_URL of the dataProvider in the automatically created file, I got the following error.
---
Something went wrong while fetching the resource data.
Please check your data provider and API for resource "products".
For more info, please check the documentation.
---

URL before change
https://api.fake-rest.refine.dev
URL after change
http://localhost:3001

I am trying to display the product list at the following URL, and if you go directly to the URL, you will get the data returned in an array without any problems.
http://localhost:3001/products



The following data is returned.

[{"id":1, "title": "title", "content": "content", "createdAt": "2023-10-10T17:38:13.486Z", "updatedAt": "2023-10-10T17:38:01.454Z"}]

The frontend is created in Next.js
The backend is created in NestJS and the API is provided in a generic CRUD.
If I change the database, do I need to configure anything other than changing the URL?
2023-10-11_2.52.33.png
2023-10-11_2.53.18.png
2023-10-11_2.53.47.png
Was this page helpful?