getSessions
This commit is contained in:
@@ -2,7 +2,7 @@ import axios from "axios";
|
||||
|
||||
import keycloak from "./keycloak";
|
||||
import { get } from "http";
|
||||
import { ActiviteDTO, AdminDTO, AthleteDTO, CoachDTO } from "./classesDTO";
|
||||
import { ActiviteDTO, AdminDTO, AthleteDTO, CoachDTO, SessionDTO } from "./classesDTO";
|
||||
|
||||
|
||||
const api = axios.create({
|
||||
@@ -65,7 +65,7 @@ export const activiteService = {
|
||||
export const sessionService = {
|
||||
// controller uses singular /session/* endpoints
|
||||
create: (data: any) => api.post(`/session/create`, data),
|
||||
getAll: () => api.get(`/session/all`),
|
||||
getAll: () => api.get<SessionDTO[]>(`/session/all`),
|
||||
getById: (id: number | string) => api.get(`/session/${id}`),
|
||||
delete: (id: number | string) => api.delete(`/session/delete/${id}`),
|
||||
update: (id: number | string, data: any) => api.put(`/session/update/${id}`, data),
|
||||
|
||||
Reference in New Issue
Block a user