Compare commits

...

3 commits

Author SHA1 Message Date
glazk0
2051e5822a
fix: removed unused imageUrl 2024-02-26 11:58:00 +01:00
glazk0
ec3a4b1ffe
fix: superform fix 2024-02-26 11:57:17 +01:00
glazk0
37e59565a7
fix: database type file rename case 2024-02-20 17:04:05 +01:00
3 changed files with 9 additions and 8 deletions

View file

@ -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: 'https://my-site.com/images/og-image.jpg',
imageUrl: '',
keywords: ['peerat', 'code', 'cybersecurite', 'programmation', 'apprendre en s\'amusant'],
author: 'peerat',
locale: 'fr',

View file

@ -1,9 +1,10 @@
import { fail, type Actions } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
import { z } from 'zod';
import { superValidate } from 'sveltekit-superforms/server';
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 { z } from 'zod';
const settingSchema = z.object({
firstname: z.string({
@ -20,7 +21,7 @@ const settingSchema = z.object({
export const load = (async ({ parent, locals: { user } }) => {
await parent();
const form = await superValidate(user, settingSchema);
const form = await superValidate(user, zod(settingSchema));
return {
form
@ -31,7 +32,7 @@ export const actions = {
default: async ({ request, cookies }) => {
const session = cookies.get('session');
const form = await superValidate(request, settingSchema);
const form = await superValidate(request, zod(settingSchema));
if (!form.valid) {
return fail(400, { form });