création de session fix en cours

This commit is contained in:
trochas
2026-01-09 12:58:20 +01:00
parent 9ac25f9ab6
commit 39e8be7427
5 changed files with 100 additions and 45 deletions

View File

@@ -2,7 +2,7 @@ import axios from "axios";
import keycloak from "./keycloak";
import { get } from "http";
import { AdminDTO, AthleteDTO, CoachDTO } from "./classesDTO";
import { ActiviteDTO, AdminDTO, AthleteDTO, CoachDTO } from "./classesDTO";
const api = axios.create({
@@ -55,7 +55,7 @@ export const athleteService = {
export const activiteService = {
create: (data: any) => api.post("/activite/create", data),
delete: (id: number | string) => api.delete(`/activite/delete/${id}`),
update: (id: number | string, data: any) => api.post(`/activite/update/${id}`, data),
update: (id: number | string, data: ActiviteDTO) => api.post(`/activite/update/${id}`, data),
getById: (id: number | string) => api.get(`/activite/${id}`),
getAll: () => api.get(`/activite/all`),
getByTheme: (theme: string) => api.get(`/activite/theme/${encodeURIComponent(theme)}`),