Fix breaking changes

This commit is contained in:
Tas Hasting 2022-03-27 11:40:04 -05:00
parent 19bff9a39c
commit ed66d383b1
8 changed files with 7 additions and 29 deletions

View File

@ -1,17 +1,3 @@
import type { Handle } from "@sveltejs/kit";
import { appAuth } from "$lib/appAuth";
export const handle: Handle = async ({ event, resolve }) => {
// TODO https://github.com/sveltejs/kit/issues/1046
if (event.request.query.has("_method")) {
event.request.method = event.request.query.get("_method").toUpperCase();
}
const response = await resolve(event);
return response;
};
export const { getSession } = appAuth;

View File

@ -47,7 +47,7 @@
"rounded-full",
)}
>
{#if $page.path === "/profile"}
{#if $page.url.pathname === "/profile"}
<svg
xmlns="http://www.w3.org/2000/svg"
class={clsx("h-6", "w-6")}
@ -118,7 +118,7 @@
"p-2",
"rounded-full",
)}
class:text-orange-500={$page.path === "/login"}
class:text-orange-500={$page.url.pathname === "/login"}
>
<svg
xmlns="http://www.w3.org/2000/svg"

View File

@ -9,11 +9,6 @@ const config = {
postcss: true,
}),
],
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: "#svelte",
},
};
export default config;

View File

@ -1,6 +1,5 @@
import type { GetSession, RequestHandler } from "@sveltejs/kit";
import type { EndpointOutput } from "@sveltejs/kit/types/endpoint";
import { RequestEvent } from "@sveltejs/kit/types/hooks";
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
import cookie from "cookie";
import * as jsonwebtoken from "jsonwebtoken";
import type { JWT, Session } from "./interfaces";

View File

@ -1,5 +1,4 @@
import type { EndpointOutput } from "@sveltejs/kit";
import { RequestEvent } from "@sveltejs/kit/types/hooks";
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
import type { Auth } from "../auth";
import type { CallbackResult } from "../types";

View File

@ -1,5 +1,4 @@
import type { EndpointOutput } from "@sveltejs/kit/types/endpoint";
import { RequestEvent } from "@sveltejs/kit/types/hooks";
import type { EndpointOutput, RequestEvent } from "@sveltejs/kit";
import type { Auth } from "../auth";
import type { CallbackResult } from "../types";
import { Provider, ProviderConfig } from "./base";

View File

@ -1,4 +1,4 @@
import { RequestEvent } from "@sveltejs/kit/types/hooks";
import { RequestEvent } from "@sveltejs/kit";
import type { Auth } from "../auth";
import { ucFirst } from "../helpers";
import { OAuth2BaseProvider, OAuth2BaseProviderConfig, OAuth2Tokens } from "./oauth2.base";

View File

@ -1,4 +1,4 @@
import { RequestEvent } from "@sveltejs/kit/types/hooks";
import { RequestEvent } from "@sveltejs/kit";
import type { Auth } from "../auth";
import { OAuth2BaseProvider, OAuth2BaseProviderConfig } from "./oauth2.base";