Add node-fetch dependency and implement meeting report submission endpoint
This commit introduces the node-fetch package to facilitate HTTP requests in the backend. Additionally, a new API endpoint for submitting meeting reports has been implemented in the nuscoreApiRoutes. The endpoint handles report data submission, cookie management, and error handling, enhancing the functionality of the meeting report feature. Frontend components have been updated to support this new functionality, improving the overall user experience.
This commit is contained in:
@@ -176,6 +176,14 @@ app.get('*', (req, res) => {
|
||||
await renameColumnIfExists('official_tournaments', 'meldeschluesse', 'registration_deadlines', 'TEXT NULL');
|
||||
|
||||
const isDev = process.env.STAGE === 'dev';
|
||||
|
||||
// Foreign Keys temporär deaktivieren für MySQL
|
||||
try {
|
||||
await sequelize.query('SET FOREIGN_KEY_CHECKS = 0');
|
||||
} catch (e) {
|
||||
console.warn('[sync] Could not disable foreign key checks:', e?.message);
|
||||
}
|
||||
|
||||
const safeSync = async (model) => {
|
||||
try {
|
||||
if (isDev) {
|
||||
@@ -235,6 +243,15 @@ app.get('*', (req, res) => {
|
||||
await safeSync(ApiLog);
|
||||
await safeSync(MemberTransferConfig);
|
||||
await safeSync(MemberContact);
|
||||
await safeSync(ClubTeam);
|
||||
await safeSync(TeamDocument);
|
||||
|
||||
// Foreign Keys wieder aktivieren
|
||||
try {
|
||||
await sequelize.query('SET FOREIGN_KEY_CHECKS = 1');
|
||||
} catch (e) {
|
||||
console.warn('[sync] Could not enable foreign key checks:', e?.message);
|
||||
}
|
||||
|
||||
// Start scheduler service
|
||||
schedulerService.start();
|
||||
|
||||
Reference in New Issue
Block a user