Remove unnecessary database migration scripts and update info modal text
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user