Add landing page
This commit is contained in:
parent
3fea484585
commit
bce86ee840
47 changed files with 7119 additions and 439 deletions
27
scripts/cleanup-old-event.js
Normal file
27
scripts/cleanup-old-event.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import mongoose from 'mongoose';
|
||||
import Event from '../server/models/event.js';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
const MONGODB_URI = process.env.NUXT_MONGODB_URI || process.env.MONGODB_URI;
|
||||
|
||||
async function cleanup() {
|
||||
try {
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
|
||||
// Delete the old Session 0 event (the one without a position)
|
||||
const result = await Event.deleteOne({
|
||||
title: 'Session 0: Orientation',
|
||||
'series.position': { $exists: false }
|
||||
});
|
||||
|
||||
console.log(`✓ Deleted ${result.deletedCount} old event(s)`);
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
cleanup();
|
||||
Loading…
Add table
Add a link
Reference in a new issue