blob: 36ed9482fd478fd142349e603a0d1efb6cb1ea28 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
export default class ServicesApi {
constructor(server, local) {
this.local = local;
this.server = server;
}
all() {
return this.server.getServices();
}
// one(customerId) {
// return this.server.getCustomer(customerId);
// }
//
// search(needle) {
// return this.server.searchCustomers(needle);
// }
//
create(recipeId, data) {
return this.server.createService(recipeId, data);
}
delete(serviceId) {
return this.server.deleteService(serviceId);
}
update(serviceId, data) {
return this.server.updateService(serviceId, data);
}
reorder(data) {
return this.server.reorderService(data);
}
clearCache(serviceId) {
return this.local.clearCache(serviceId);
}
}
|