Create vocabulary service
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 27 Nov 2018 08:58:58 +0000 (09:58 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 27 Nov 2018 08:58:58 +0000 (09:58 +0100)
Feature #14393

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/services/vocabulary-service/vocabulary-service.ts [new file with mode: 0644]

diff --git a/src/services/vocabulary-service/vocabulary-service.ts b/src/services/vocabulary-service/vocabulary-service.ts
new file mode 100644 (file)
index 0000000..57bdd7c
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import Axios from 'axios';
+import { Vocabulary } from '~/models/vocabulary';
+
+export class VocabularyService {
+    constructor(
+        private url: string
+    ) { }
+
+    getVocabulary() {
+        return Axios
+            .get<Vocabulary>(this.url)
+            .then(response => response.data);
+    }
+}