feat(political-benefits): implement political powers and benefits system
All checks were successful
Deploy to production / deploy (push) Successful in 3m3s
All checks were successful
Deploy to production / deploy (push) Successful in 3m3s
- Added new political powers and benefits functionalities, including reputation ticks, tax jurisdiction management, and appointment capabilities. - Introduced a new job for periodic reputation updates and created necessary database tables for tracking political benefits. - Enhanced the FalukantController and services to support new endpoints for managing political powers and appointments. - Updated localization files to reflect new features and improve user experience across multiple languages. - Modified the UI to display new political powers and benefits, ensuring accurate representation in the PoliticsView.
This commit is contained in:
@@ -46,6 +46,19 @@ if (USE_TLS && TLS_KEY_PATH && TLS_CERT_PATH) {
|
||||
}
|
||||
|
||||
syncDatabase().then(() => {
|
||||
if (process.env.FALUKANT_POLITICAL_REPUTATION_JOB === '1') {
|
||||
const intervalMs = Number.parseInt(process.env.FALUKANT_POLITICAL_REPUTATION_MS || '3600000', 10);
|
||||
import('./jobs/politicalBenefitsTick.js')
|
||||
.then(({ runPoliticalReputationTicks }) => {
|
||||
const run = () =>
|
||||
runPoliticalReputationTicks().catch((e) => console.error('[PoliticalBenefits]', e));
|
||||
run();
|
||||
setInterval(run, intervalMs);
|
||||
console.log(`[PoliticalBenefits] Job aktiv, Intervall ${intervalMs} ms`);
|
||||
})
|
||||
.catch((e) => console.error('[PoliticalBenefits] Job-Import fehlgeschlagen:', e));
|
||||
}
|
||||
|
||||
// API-Server auf Port 2020 (intern, nur localhost)
|
||||
httpServer.listen(API_PORT, API_HOST, () => {
|
||||
console.log(`[API] HTTP-Server läuft auf ${API_HOST}:${API_PORT}`);
|
||||
|
||||
Reference in New Issue
Block a user