Add and delete migration files

This commit is contained in:
Sean Morley
2024-04-11 23:58:09 +00:00
parent a17c482522
commit a03fc5fb4e
38 changed files with 1663 additions and 945 deletions

View File

@@ -0,0 +1,19 @@
import { redirect } from "@sveltejs/kit";
import type { PageServerLoad } from "./$types";
import type { Adventure } from "$lib/utils/types";
import { db } from "$lib/db/db.server";
import { worldTravelCountries } from "$lib/db/schema";
export const load: PageServerLoad = async (event) => {
if (!event.locals.user) {
return redirect(302, "/login");
}
let response = await db
.select()
.from(worldTravelCountries)
// let array = result.adventures as Adventure[];
return {
response,
};
};