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