Просмотр исходного кода

Update allocation.js

Signed-off-by: Stephen Atwell <78044713+stephenatwell@users.noreply.github.com>
Stephen Atwell 3 лет назад
Родитель
Сommit
ec74db88d8
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      ui/src/services/allocation.js

+ 4 - 2
ui/src/services/allocation.js

@@ -1,13 +1,15 @@
 import axios from 'axios';
 
-class AllocationService {
-  func getenv(key, fallback string) string {
+
+func getenv(key, fallback string) string {
     value := os.Getenv(key)
     if len(value) == 0 {
         return fallback
     }
     return value
 }
+
+class AllocationService {
   BASE_URL = getenv('BASE_URL','http://localhost:9090/allocation');
 
   async fetchAllocation(win, aggregate, options) {