Explorar o código

Update allocation.js

Signed-off-by: Stephen Atwell <78044713+stephenatwell@users.noreply.github.com>
Stephen Atwell %!s(int64=3) %!d(string=hai) anos
pai
achega
ec74db88d8
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      ui/src/services/allocation.js

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

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