Compare commits
No commits in common. "2051e5822ad418aa22aaa5ed5bc1cf563609d718" and "8ba01a5019cb6b216f137750bf231132c9cfcd86" have entirely different histories.
2051e5822a
...
8ba01a5019
3 changed files with 6 additions and 7 deletions
|
@ -3,7 +3,7 @@ export const siteConfig = {
|
|||
url: 'https://app.peerat.dev',
|
||||
title: 'Peer-at Code',
|
||||
description: 'Apprendre la programmation et la cybersécurité en s\'amusant.',
|
||||
imageUrl: '',
|
||||
imageUrl: 'https://my-site.com/images/og-image.jpg',
|
||||
keywords: ['peerat', 'code', 'cybersecurite', 'programmation', 'apprendre en s\'amusant'],
|
||||
author: 'peerat',
|
||||
locale: 'fr',
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import { API_URL } from '$env/static/private';
|
||||
import { fail, type Actions } from '@sveltejs/kit';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
import { zod } from 'sveltekit-superforms/adapters';
|
||||
import { superValidate } from 'sveltekit-superforms/server';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { z } from 'zod';
|
||||
import { superValidate } from 'sveltekit-superforms/server';
|
||||
import { API_URL } from '$env/static/private';
|
||||
|
||||
const settingSchema = z.object({
|
||||
firstname: z.string({
|
||||
|
@ -21,7 +20,7 @@ const settingSchema = z.object({
|
|||
export const load = (async ({ parent, locals: { user } }) => {
|
||||
await parent();
|
||||
|
||||
const form = await superValidate(user, zod(settingSchema));
|
||||
const form = await superValidate(user, settingSchema);
|
||||
|
||||
return {
|
||||
form
|
||||
|
@ -32,7 +31,7 @@ export const actions = {
|
|||
default: async ({ request, cookies }) => {
|
||||
const session = cookies.get('session');
|
||||
|
||||
const form = await superValidate(request, zod(settingSchema));
|
||||
const form = await superValidate(request, settingSchema);
|
||||
|
||||
if (!form.valid) {
|
||||
return fail(400, { form });
|
||||
|
|
Loading…
Add table
Reference in a new issue