sveltekit-pocketbase-starter
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "sveltekit-pocketbase-starter", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": "Dominick Caponi <d.caponi1@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import type { Handle } from '@sveltejs/kit'; | ||
import PocketBase from 'pocketbase'; | ||
import type { RequestEvent, RequestHandler } from './$types'; | ||
import { VITE_POCKETBASE_URL } from '$env/static/private'; | ||
@@ -27,3 +26,3 @@ | ||
sameSite: isProd ? 'none' : 'lax', | ||
domain: isProd ? ".indexter.tech" : "localhost" | ||
domain: isProd ? ".yoursite.tld" : "localhost" | ||
}) | ||
@@ -30,0 +29,0 @@ ); |
@@ -6,3 +6,3 @@ import { redirect } from '@sveltejs/kit'; | ||
export const load: LayoutServerLoad = async ({ locals, url }) => { | ||
const protectedRoutes = ['interview', 'summary', 'credits'] | ||
const protectedRoutes = ['protected'] | ||
@@ -9,0 +9,0 @@ if (!locals.pb?.authStore.isValid && protectedRoutes.includes(url.pathname.split("/").filter(Boolean)[0])) { |
import { redirect } from '@sveltejs/kit'; | ||
import type { RequestEvent, RequestHandler } from './$types'; | ||
export const GET: RequestHandler = async ({ locals, url, cookies }: RequestEvent) => { | ||
export const GET: RequestHandler = async ({ locals, url }: RequestEvent) => { | ||
const urlParts = url.toString().split('/') | ||
@@ -6,0 +6,0 @@ const token = urlParts[urlParts.length - 1] |
@@ -1,2 +0,2 @@ | ||
import { fail, redirect, type Cookies, type HttpError } from '@sveltejs/kit'; | ||
import { fail, redirect, type Cookies } from '@sveltejs/kit'; | ||
import type { PageServerLoad } from './$types'; | ||
@@ -3,0 +3,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
365592
327