Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Mar 31, 2024
1 parent 6e0df21 commit 667871a
Show file tree
Hide file tree
Showing 98 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions frontend/src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { BASE_API_URL } from '$lib/utils/constants';
import type { User } from '$lib/utils/types';
import { redirect, type Handle, type RequestEvent, type HandleFetch } from '@sveltejs/kit';

export const rewriteUrl = (url: string): string => {
console.log("coucou", url)
return url;
}

async function ensureCsrfToken(event: RequestEvent): Promise<string> {
let csrfToken = event.cookies.get('csrftoken') || '';
if (!csrfToken) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
// Most of your app wide CSS should be put in this file
import '../../app.postcss';
import '../../../app.postcss';
import { AppShell, AppBar } from '@skeletonlabs/skeleton';
import SideBar from '$lib/components/SideBar/SideBar.svelte';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const load: PageServerLoad = async ({ request, locals }) => {
}

const form = await superValidate(request, loginSchema);

return { form };
};

Expand All @@ -23,7 +22,7 @@ export const actions: Actions = {
if (!form.valid) {
return fail(400, { form });
}

console.log("coucou", request, url)
const username = form.data.username;
const password = form.data.password;

Expand Down Expand Up @@ -86,6 +85,7 @@ export const actions: Actions = {
});
}
}
console.log("coucou2")
redirect(302, url.searchParams.get('next') || '/analytics');
}
};

0 comments on commit 667871a

Please sign in to comment.