chore: dont break the app by throwing error just yet
This commit is contained in:
parent
9a8a7ee978
commit
65bf663b67
|
@ -10,10 +10,16 @@ type AccountData = AccountParams;
|
|||
|
||||
export const accountProvider: SdkProvider = {
|
||||
getList: () => {
|
||||
throw Error("Not Implemented")
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: [],
|
||||
});
|
||||
},
|
||||
getOne: () => {
|
||||
throw Error("Not Implemented")
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
// @ts-ignore
|
||||
async update<TVariables extends AccountParams = AccountParams>(
|
||||
|
@ -44,10 +50,16 @@ export const accountProvider: SdkProvider = {
|
|||
};
|
||||
},
|
||||
create: () => {
|
||||
throw Error("Not Implemented")
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
deleteOne: () => {
|
||||
throw Error("Not Implemented")
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
getApiUrl: () => "",
|
||||
}
|
||||
|
|
|
@ -1,11 +1,39 @@
|
|||
import type { DataProvider } from "@refinedev/core";
|
||||
import {SdkProvider} from "~/data/sdk-provider.js";
|
||||
import { SdkProvider } from "~/data/sdk-provider.js";
|
||||
|
||||
export const fileProvider: SdkProvider = {
|
||||
getList: () => { throw Error("Not Implemented") },
|
||||
getOne: () => { throw Error("Not Implemented") },
|
||||
update: () => { throw Error("Not Implemented") },
|
||||
create: () => { throw Error("Not Implemented") },
|
||||
deleteOne: () => { throw Error("Not Implemented") },
|
||||
export const fileProvider = {
|
||||
getList: () => {
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: [],
|
||||
total: 0,
|
||||
});
|
||||
},
|
||||
getOne: () => {
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {
|
||||
id: 1
|
||||
},
|
||||
});
|
||||
},
|
||||
update: () => {
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
create: () => {
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
deleteOne: () => {
|
||||
console.log("Not implemented");
|
||||
return Promise.resolve({
|
||||
data: {},
|
||||
});
|
||||
},
|
||||
getApiUrl: () => "",
|
||||
}
|
||||
} satisfies SdkProvider;
|
||||
|
|
Loading…
Reference in New Issue