Multiple minor fixes

This commit is contained in:
Pax1601
2023-03-14 22:25:00 +01:00
parent 16b5e89a3e
commit 9ed4189c28
20 changed files with 91 additions and 75 deletions

View File

@@ -9,6 +9,7 @@ const UNITS_URI = "units";
const LOGS_URI = "logs";
const AIRBASES_URI = "airbases";
const BULLSEYE_URI = "bullseyes";
const MISSION_URI = "mission";
var lastUpdateTime = 0;
var demoEnabled = false;
@@ -56,6 +57,10 @@ export function getLogs(callback: CallableFunction) {
GET(callback, LOGS_URI);
}
export function getMission(callback: CallableFunction) {
GET(callback, MISSION_URI);
}
export function getUnits(callback: CallableFunction, refresh: boolean = false) {
GET(callback, `${UNITS_URI}?time=${refresh? 0: lastUpdateTime}`);
}