Remove unnecessary database migration scripts and update info modal text

This commit is contained in:
Sean Morley
2024-04-13 19:48:53 +00:00
parent 11ace187a7
commit fd1b85609e
48 changed files with 134 additions and 5947 deletions

View File

@@ -5,15 +5,8 @@
import AdventureCard from "$lib/components/AdventureCard.svelte";
import type { Adventure } from "$lib/utils/types";
import {
addAdventure,
clearAdventures,
getAdventures,
getNextId,
} from "../../services/adventureService";
import { onMount } from "svelte";
import { exportData } from "../../services/export";
import { importData } from "../../services/import";
import exportFile from "$lib/assets/exportFile.svg";
import deleteIcon from "$lib/assets/deleteIcon.svg";
import SucessToast from "$lib/components/SucessToast.svelte";

View File

@@ -4,10 +4,10 @@ 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");
}
export const load: PageServerLoad = async () => {
// if (!event.locals.user) {
// return redirect(302, "/login");
// }
let response = await db
.select()
.from(worldTravelCountries)

View File

@@ -3,7 +3,6 @@
import AdventureCard from "$lib/components/AdventureCard.svelte";
export let data: any;
console.log(data.response);
async function nav(loc: string) {
goto(`/worldtravel/${loc}`);

View File

@@ -2,14 +2,15 @@
import { db } from '$lib/db/db.server.js';
import { worldTravelCountryRegions } from '$lib/db/schema.js';
import { eq } from 'drizzle-orm';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ params, locals }) => {
export async function load({ params }) {
const { countrycode } = params;
let data = await db
.select()
.from(worldTravelCountryRegions)
.where(eq(worldTravelCountryRegions.country_code, countrycode))
console.log(data)
return {
regions : data,
};