From d0d1ae65a2a95732dee3edd190d2680a2fdeaba2 Mon Sep 17 00:00:00 2001 From: neckfire Date: Tue, 21 Jul 2026 12:01:15 +0200 Subject: [PATCH] =?UTF-8?q?fix(session):=20d=C3=A9marrage=20de=20s=C3=A9an?= =?UTF-8?q?ce=20lisait=20res.session.id=20alors=20que=20l'API=20renvoie=20?= =?UTF-8?q?{data:{id}}=20->=20res.data.id=20(fini=20'impossible=20de=20d?= =?UTF-8?q?=C3=A9marrer=20la=20s=C3=A9ance')?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- app/pages/session/new.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pages/session/new.vue b/app/pages/session/new.vue index cb7e374..48ea929 100644 --- a/app/pages/session/new.vue +++ b/app/pages/session/new.vue @@ -8,11 +8,11 @@ const { t } = useI18n() onMounted(async () => { try { const routineId = route.query.routine ? Number(route.query.routine) : undefined - const res = await api<{ session: { id: number } }>('/api/sessions', { + const res = await api<{ data: { id: number } }>('/api/sessions', { method: 'POST', body: { routine_id: routineId } }) - await navigateTo(`/session/${res.session.id}`) + await navigateTo(`/session/${res.data.id}`) } catch { toast.add({ title: t('session.cantStart'), color: 'error' }) await navigateTo('/')