diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-02 09:24:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-02 09:24:32 +0200 |
commit | bfe8847d72cd0893230f2e654242658214943e61 (patch) | |
tree | 3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/api/ServicesApi.ts | |
parent | fix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff) | |
download | ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.gz ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.zst ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.zip |
chore: convert various files from JS to TS (#2010)
Diffstat (limited to 'src/api/ServicesApi.ts')
-rw-r--r-- | src/api/ServicesApi.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/api/ServicesApi.ts b/src/api/ServicesApi.ts new file mode 100644 index 000000000..5bd8aa60e --- /dev/null +++ b/src/api/ServicesApi.ts | |||
@@ -0,0 +1,34 @@ | |||
1 | export default class ServicesApi { | ||
2 | server: any; | ||
3 | |||
4 | local: any; | ||
5 | |||
6 | constructor(server: any, local: any) { | ||
7 | this.server = server; | ||
8 | this.local = local; | ||
9 | } | ||
10 | |||
11 | all() { | ||
12 | return this.server.getServices(); | ||
13 | } | ||
14 | |||
15 | create(recipeId: string, data: any) { | ||
16 | return this.server.createService(recipeId, data); | ||
17 | } | ||
18 | |||
19 | delete(serviceId: string) { | ||
20 | return this.server.deleteService(serviceId); | ||
21 | } | ||
22 | |||
23 | update(serviceId: string, data: any) { | ||
24 | return this.server.updateService(serviceId, data); | ||
25 | } | ||
26 | |||
27 | reorder(data: any) { | ||
28 | return this.server.reorderService(data); | ||
29 | } | ||
30 | |||
31 | clearCache(serviceId: string) { | ||
32 | return this.local.clearCache(serviceId); | ||
33 | } | ||
34 | } | ||