Remove userVisitedAdventuresTable

This commit is contained in:
Sean Morley
2024-04-26 23:04:41 +00:00
parent db8fc061f2
commit 08579289a6
36 changed files with 132 additions and 6593 deletions

View File

@@ -2,9 +2,9 @@ import { error, redirect, type Actions, type Handle } from "@sveltejs/kit";
import type { PageServerLoad } from "./$types";
import { db } from "$lib/db/db.server";
import {
adventureTable,
sessionTable,
userTable,
userVisitedAdventures,
userVisitedWorldTravel,
} from "$lib/db/schema";
import type { DatabaseUser } from "$lib/server/auth";
@@ -25,7 +25,7 @@ export const load: PageServerLoad = async (event) => {
users = (await db.select().from(userTable).execute()) as DatabaseUser[];
visitCount = (await db
.select({ count: count() })
.from(userVisitedAdventures)
.from(adventureTable)
.execute()) as unknown as number;
userCount = (await db
.select({ count: count() })