Add landing page
This commit is contained in:
parent
3fea484585
commit
bce86ee840
47 changed files with 7119 additions and 439 deletions
34
scripts/debug-series.js
Normal file
34
scripts/debug-series.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import mongoose from 'mongoose';
|
||||
import Series from '../server/models/series.js';
|
||||
import Event from '../server/models/event.js';
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/ghostguild';
|
||||
|
||||
async function debug() {
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
|
||||
const series = await Series.find({}).lean();
|
||||
console.log('Series in DB:');
|
||||
series.forEach(s => console.log(` ${s.id}: ${s.title}`));
|
||||
|
||||
console.log('\nAll events with series.id:');
|
||||
const allEvents = await Event.find({ 'series.id': { $exists: true } })
|
||||
.select('title series.id series.isSeriesEvent')
|
||||
.lean();
|
||||
|
||||
console.log(`Total: ${allEvents.length}`);
|
||||
allEvents.forEach(e => {
|
||||
console.log(` - ${e.title}`);
|
||||
console.log(` series.id: ${e.series?.id}`);
|
||||
console.log(` series.isSeriesEvent: ${e.series?.isSeriesEvent}`);
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
debug();
|
||||
Loading…
Add table
Add a link
Reference in a new issue