17944: Request the vocabulary exclusively from the new controller's endpoint.
[arvados-workbench2.git] / src / services / vocabulary-service / vocabulary-service.ts
index 57bdd7c925c22e65160bbd5f9f5a557c26637ca7..38163f77860d2d41af57c1526df3f752009df4a7 100644 (file)
@@ -3,16 +3,16 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import Axios from 'axios';
-import { Vocabulary } from '~/models/vocabulary';
+import { Vocabulary } from 'models/vocabulary';
 
 export class VocabularyService {
     constructor(
         private url: string
     ) { }
 
-    getVocabulary() {
-        return Axios
-            .get<Vocabulary>(this.url)
-            .then(response => response.data);
+    async getVocabulary() {
+        const response = await Axios
+            .get<Vocabulary>(this.url);
+        return response.data;
     }
 }