Initial commit
This commit is contained in:
16
src/server/dataProvider/index.js
Normal file
16
src/server/dataProvider/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const mapping = {
|
||||
product_detail: (store) => {
|
||||
console.log("mapper");
|
||||
return Promise.resolve(store);
|
||||
},
|
||||
authentication: (store) => {
|
||||
return Promise.resolve(store);
|
||||
}
|
||||
};
|
||||
|
||||
export function provideData(store, routes) {
|
||||
if (routes && routes[1] && routes[1].name && mapping[routes[1].name]) {
|
||||
return mapping[routes[1].name](store);
|
||||
}
|
||||
return Promise.resolve(store);
|
||||
}
|
||||
Reference in New Issue
Block a user