Add landing page
This commit is contained in:
parent
3fea484585
commit
bce86ee840
47 changed files with 7119 additions and 439 deletions
32
scripts/check-events.js
Normal file
32
scripts/check-events.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import mongoose from 'mongoose';
|
||||
import Event from '../server/models/event.js';
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/ghostguild';
|
||||
|
||||
async function checkEvents() {
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
console.log('Connected to MongoDB');
|
||||
|
||||
// Check events with the series
|
||||
const events = await Event.find({
|
||||
'series.id': 'coop-values-into-practice-2025'
|
||||
}).select('title series').lean();
|
||||
|
||||
console.log(`\nFound ${events.length} events for series 'coop-values-into-practice-2025'\n`);
|
||||
|
||||
events.forEach((event, index) => {
|
||||
console.log(`${index + 1}. ${event.title}`);
|
||||
console.log(` series.id: ${event.series?.id}`);
|
||||
console.log(` series.isSeriesEvent: ${event.series?.isSeriesEvent}`);
|
||||
console.log('');
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
checkEvents();
|
||||
Loading…
Add table
Add a link
Reference in a new issue