added login with pages and database, also correct errors in score submit

This commit is contained in:
2026-06-22 13:36:34 +01:00
parent 192564fb79
commit fbc181c890
42 changed files with 31351 additions and 1599 deletions

View File

@@ -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) {