Set default project to test

This commit is contained in:
Johannes Baumeister 2026-06-25 10:21:14 +02:00
parent 955c71a02e
commit 15471c52ff
2 changed files with 3 additions and 3 deletions

4
app.js
View File

@ -19,7 +19,7 @@ document.addEventListener('DOMContentLoaded', async () => {
const getProjektId = () => { const getProjektId = () => {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('project') || urlParams.get('projekt') || urlParams.get('projekt_id') || "BWSamern-Ohne"; return urlParams.get('project') || urlParams.get('projekt') || urlParams.get('projekt_id') || "test";
}; };
const STATUS_MAP = { const STATUS_MAP = {
@ -1225,7 +1225,7 @@ document.addEventListener('DOMContentLoaded', async () => {
// Priority 2: Use globalThis.LAYER_CONFIG (Script-based config) or remote config // Priority 2: Use globalThis.LAYER_CONFIG (Script-based config) or remote config
// Only load local config layers if the project is the default (bwsamern-ohne) // Only load local config layers if the project is the default (bwsamern-ohne)
if (projId.toLowerCase() === 'bwsamern-ohne') { if (projId.toLowerCase() === 'bwsamern-ohne' || projId.toLowerCase() === 'test') {
const layers = await resolveLayerConfig(isLocalFile, statusEl); const layers = await resolveLayerConfig(isLocalFile, statusEl);
if (layers) { if (layers) {
await loadConfigLayers(layers); await loadConfigLayers(layers);

View File

@ -57,7 +57,7 @@ app.get('/api/logs', (req, res) => {
// API to save turbines // API to save turbines
app.post('/api/wea', async (req, res) => { app.post('/api/wea', async (req, res) => {
const { projekt_id, turbines } = req.body; const { projekt_id, turbines } = req.body;
const targetProject = projekt_id || 'BWSamern-Ohne'; const targetProject = projekt_id || 'test';
const schema = process.env.DB_SCHEMA || 'geodaten'; const schema = process.env.DB_SCHEMA || 'geodaten';
log(`Empfange Save-Request für Projekt: ${targetProject} (${turbines?.length || 0} WEAs)`); log(`Empfange Save-Request für Projekt: ${targetProject} (${turbines?.length || 0} WEAs)`);