source: frontend/src/api/patient.ts@ 700e2f9

main
Last change on this file since 700e2f9 was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago

Init

  • Property mode set to 100644
File size: 614 bytes
RevLine 
[700e2f9]1import { apiClient } from "@/api/client";
2
3export interface Patient {
4 userId: number;
5 firstName: string;
6 lastName: string;
7 email: string;
8}
9
10export const patientApi = {
11 getAllPatients: async (): Promise<Patient[]> =>
12 apiClient.get<Patient[]>("/patients"),
13
14 setTherapist: async (therapistId: number): Promise<void> =>
15 apiClient.put<void>(`/patients/therapist/${therapistId}`),
16
17 removeTherapist: async (): Promise<void> =>
18 apiClient.delete<void>("/patients/therapist"),
19
20 getCurrentTherapist: async (): Promise<number | null> =>
21 apiClient.get<number | null>("/patients/therapist"),
22};
Note: See TracBrowser for help on using the repository browser.