我需要为使用mongoDB的应用程序创建一个自定义DataProvider,并且以https://r8p7az51jd.execute-api.us-east-1.amazonaws.com/test/viewpoint?$ filter = {}格式进行查询-用于GET和POST查询。 如果我运行这样的代码,它将无法正常工作
这是我的代码:
import React from 'react';
import { Admin, Resource, ListGuesser } from 'react-admin';
import { UserList, PostEdit, PostCreate, PostList } from './categories';
import authProvider from './authProvider';
import jsonServerProvider from './DataProvider';
const dataProvider = jsonServerProvider('https://r8p7az51jd.execute-api.us-east-1.amazonaws.com/test');
const App = () => (
<Admin authProvider={authProvider} dataProvider={dataProvider}>
<Resource name="viewpoint" list={ListGuesser} />
</Admin>
);
export default App;