feat(admin): move integration URLs and credentials to GUI settings
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user