added login with pages and database, also correct errors in score submit
This commit is contained in:
@@ -43,11 +43,18 @@ async function seed() {
|
||||
await db.delete(schema.players);
|
||||
await db.delete(schema.divisions);
|
||||
await db.delete(schema.teams);
|
||||
await db.delete(schema.scorers);
|
||||
await db.delete(schema.sessions);
|
||||
|
||||
await client.execute('DELETE FROM sqlite_sequence');
|
||||
|
||||
console.log('Database reset complete. Seeding...');
|
||||
|
||||
let passwordHash = await Bun.password.hash('password');
|
||||
await db
|
||||
.insert(schema.scorers)
|
||||
.values({ id: crypto.randomUUID(), username: 'admin', passwordHash: passwordHash });
|
||||
|
||||
// --- 1. Teams ---
|
||||
const teamsCSV = readCSV('teams.csv');
|
||||
for (const row of teamsCSV) {
|
||||
|
||||
Reference in New Issue
Block a user