mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2024-11-25 19:05:46 +01:00
16 lines
416 B
TypeScript
16 lines
416 B
TypeScript
|
import type { Handle } from "@sveltejs/kit";
|
||
|
import { appAuth } from "$lib/appAuth";
|
||
|
|
||
|
export const handle: Handle = async ({ request, render }) => {
|
||
|
// TODO https://github.com/sveltejs/kit/issues/1046
|
||
|
if (request.query.has("_method")) {
|
||
|
request.method = request.query.get("_method").toUpperCase();
|
||
|
}
|
||
|
|
||
|
const response = await render(request);
|
||
|
|
||
|
return response;
|
||
|
};
|
||
|
|
||
|
export const { getSession } = appAuth;
|