1
0

Remove WebServerVerticle and update API endpoints in settings.json; fix base URL formatting in multiple components

This commit is contained in:
Jose
2025-04-24 02:46:07 +02:00
parent 0390edbb97
commit 6c86f85ff1
8 changed files with 7 additions and 72 deletions

View File

@@ -7,8 +7,8 @@
},
"appConfig": {
"endpoints": {
"DATA_URL": "http://localhost:8081/api/v1",
"LOGIC_URL": "http://localhost:8082/api/v1",
"DATA_URL": "https://contaminus.miarma.net/api/raw/v1",
"LOGIC_URL": "https://contaminus.miarma.net/api/v1",
"GET_GROUPS": "/groups",
"GET_GROUP_BY_ID": "/groups/{0}",
"GET_GROUP_DEVICES": "/groups/{0}/devices",

View File

@@ -48,7 +48,7 @@ const HistoryCharts = () => {
const ENDPOINT = config.appConfig.endpoints.sensors;
const reqConfig = {
baseUrl: `${BASE}/${ENDPOINT}`,
baseUrl: `${BASE}${ENDPOINT}`,
params: {}
}

View File

@@ -70,7 +70,7 @@ const PollutionMap = ({ deviceId }) => {
let endp = ENDPOINT.replace('{0}', deviceId);
const reqConfig = {
baseUrl: `${BASE}/${endp}`,
baseUrl: `${BASE}${endp}`,
params: {}
}

View File

@@ -42,7 +42,7 @@ const SideMenu = ({ isOpen, onClose }) => {
const ENDPOINT = config.appConfig.endpoints.GET_DEVICES;
const reqConfig = {
baseUrl: `${BASE}/${ENDPOINT}`,
baseUrl: `${BASE}${ENDPOINT}`,
params: {}
}

View File

@@ -45,7 +45,7 @@ const SummaryCards = ({ deviceId }) => {
const endp = ENDPOINT.replace('{0}', deviceId);
const reqConfig = {
baseUrl: `${BASE}/${endp}`,
baseUrl: `${BASE}${endp}`,
params: {}
}

View File

@@ -1,8 +1,6 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import cleanPlugin from 'vite-plugin-clean'
import path from 'path'
import os from 'os'
// https://vite.dev/config/
export default defineConfig({
@@ -19,10 +17,7 @@ export default defineConfig({
"chartjs": ["chart.js"]
}
}
},
outDir: path.join(
os.platform() === 'win32' ? os.homedir() + '\\.contaminus\\webroot' : os.homedir() + '/.config/contaminus/webroot'
),
}
},
publicDir: 'public',
})