Add landing page
This commit is contained in:
parent
3fea484585
commit
bce86ee840
47 changed files with 7119 additions and 439 deletions
31
scripts/check-old-event.js
Normal file
31
scripts/check-old-event.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import mongoose from 'mongoose';
|
||||
import Event from '../server/models/event.js';
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/ghostguild';
|
||||
|
||||
async function check() {
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
|
||||
const oldEvent = await Event.findOne({ title: 'Session 0: Orientation' }).lean();
|
||||
|
||||
if (oldEvent) {
|
||||
console.log('Found old "Session 0: Orientation" event:');
|
||||
console.log(` ID: ${oldEvent._id}`);
|
||||
console.log(` series.id: ${oldEvent.series?.id}`);
|
||||
console.log(` series.title: ${oldEvent.series?.title}`);
|
||||
console.log('\nDeleting old event...');
|
||||
await Event.deleteOne({ _id: oldEvent._id });
|
||||
console.log('✓ Deleted');
|
||||
} else {
|
||||
console.log('No old "Session 0: Orientation" event found');
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
check();
|
||||
Loading…
Add table
Add a link
Reference in a new issue