Added automatic removal of vite proxy

This commit is contained in:
Davide Passoni
2024-06-28 11:29:44 +02:00
parent 36478f26d5
commit b3f8eb96ad
6 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class AircraftDatabase extends UnitDatabase {
constructor() {
super(window.location.href.split('?')[0] + 'api/databases/units/aircraftdatabase');
super(window.location.href.split('?')[0].replace("vite/", "") + 'api/databases/units/aircraftdatabase');
}
getCategory() {

View File

@@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class GroundUnitDatabase extends UnitDatabase {
constructor() {
super(window.location.href.split('?')[0] + 'api/databases/units/groundunitdatabase');
super(window.location.href.split('?')[0].replace("vite/", "") + 'api/databases/units/groundunitdatabase');
}
getSpawnPointsByName(name: string) {

View File

@@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class HelicopterDatabase extends UnitDatabase {
constructor() {
super(window.location.href.split('?')[0] + 'api/databases/units/helicopterdatabase');
super(window.location.href.split('?')[0].replace("vite/", "") + 'api/databases/units/helicopterdatabase');
}
getSpawnPointsByName(name: string) {

View File

@@ -4,7 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
export class NavyUnitDatabase extends UnitDatabase {
constructor() {
super(window.location.href.split('?')[0] + 'api/databases/units/navyunitdatabase');
super(window.location.href.split('?')[0].replace("vite/", "") + 'api/databases/units/navyunitdatabase');
}
getSpawnPointsByName(name: string) {