feat(admin): move integration URLs and credentials to GUI settings

This commit is contained in:
Matthias Hochmeister
2026-04-20 16:29:12 +02:00
parent 65820805b0
commit c55ec55e1b
15 changed files with 860 additions and 93 deletions

View File

@@ -1,5 +1,6 @@
import pool from '../config/database';
import logger from '../utils/logger';
import settingsService from './settings.service';
import {
VeranstaltungKategorie,
Veranstaltung,
@@ -671,7 +672,7 @@ class EventsService {
token = inserted.rows[0].token;
}
const baseUrl = (process.env.ICAL_BASE_URL || process.env.CORS_ORIGIN || '').replace(/\/$/, '');
const baseUrl = (await settingsService.getSettingOrEnv('integration_ical_base_url', process.env.ICAL_BASE_URL || process.env.CORS_ORIGIN || '')).replace(/\/$/, '');
const subscribeUrl = `${baseUrl}/api/events/calendar.ics?token=${token}`;
return { token, subscribeUrl };