mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
move demo code to examples/
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { TestData } from "./test_data";
|
||||
|
||||
export class MockServer {
|
||||
data: TestData;
|
||||
|
||||
constructor(data: TestData) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
rpc(route: string, params: any): Promise<any> {
|
||||
if (route === "web/action/load") {
|
||||
const action = this.data.actions.find(a => a.id === params.action_id);
|
||||
return Promise.resolve(action);
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user