Fix tsc errors

This commit is contained in:
2025-03-26 20:14:36 +01:00
parent cec7d47c9e
commit 980bc03ce3
2 changed files with 2 additions and 19 deletions

View File

@@ -179,7 +179,7 @@ const app = new Elysia()
Effect.runPromise,
);
return redirect(url, 302);
redirect(url, 302);
}, {
response: {
302: t.Void(),
@@ -229,7 +229,7 @@ const app = new Elysia()
.execute();
}
return redirect(process.env.NODE_ENV === "production" ? "https://music.renati.me/" : "http://localhost:5173/", 303);
redirect(process.env.NODE_ENV === "production" ? "https://music.renati.me/" : "http://localhost:5173/", 303);
}, {
response: {
303: t.Void(),

View File

@@ -222,22 +222,5 @@ export async function initDatabase(filename: string = "db.sqlite3"): Promise<Kys
.columns(["pieceId", "filename"])
.execute();
const { count } = await db
.selectFrom("User")
.select((eb) => eb.fn.countAll().as("count"))
.executeTakeFirstOrThrow();
if (BigInt(count) === 0n) {
const userId = UserId(Bun.randomUUIDv7());
const username = "admin";
const password = await Bun.password.hash("admin");
const admin = 1;
await db
.insertInto("User")
.values({ userId, username, password, admin })
.execute();
}
return db;
}