feat(front): aligner api platform et sessions [INV-20260111-02]

This commit is contained in:
2026-01-11 17:14:24 +01:00
parent 936a73fde3
commit e99f053233
17 changed files with 346 additions and 67 deletions

View File

@@ -20,7 +20,7 @@ export function useProfiles () {
const fetchProfiles = async () => {
loadingProfiles.value = true
try {
profiles.value = await $fetch(buildUrl('/profiles'), {
profiles.value = await $fetch(buildUrl('/session/profiles'), {
method: 'GET',
credentials: 'include',
headers: getSessionHeaders()
@@ -37,7 +37,7 @@ export function useProfiles () {
}
const createProfile = async ({ firstName, lastName }) => {
const profile = await $fetch(buildUrl('/profiles'), {
const profile = await $fetch(buildUrl('/session/profiles'), {
method: 'POST',
credentials: 'include',
body: { firstName, lastName },
@@ -48,7 +48,7 @@ export function useProfiles () {
}
const deleteProfile = async (profileId) => {
await $fetch(buildUrl(`/profiles/${profileId}`), {
await $fetch(buildUrl(`/session/profiles/${profileId}`), {
method: 'DELETE',
credentials: 'include',
headers: getSessionHeaders()