main
|
Last change
on this file was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago |
|
Init
|
-
Property mode
set to
100644
|
|
File size:
630 bytes
|
| Rev | Line | |
|---|
| [700e2f9] | 1 | import { apiClient } from "@/api/client";
|
|---|
| 2 |
|
|---|
| 3 | export interface TherapistInfo {
|
|---|
| 4 | idUser: number;
|
|---|
| 5 | name: string;
|
|---|
| 6 | surname: string;
|
|---|
| 7 | email: string;
|
|---|
| 8 | officeLocation: string;
|
|---|
| 9 | degree: string;
|
|---|
| 10 | yearsExp: number;
|
|---|
| 11 | phoneNumber: string;
|
|---|
| 12 | freeConsultationSlots: string[];
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | export interface Patient {
|
|---|
| 16 | userId: number;
|
|---|
| 17 | firstName: string;
|
|---|
| 18 | lastName: string;
|
|---|
| 19 | email: string;
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | export const therapistApi = {
|
|---|
| 23 | getAllTherapists: async (): Promise<TherapistInfo[]> =>
|
|---|
| 24 | apiClient.get<TherapistInfo[]>("/therapists"),
|
|---|
| 25 |
|
|---|
| 26 | getTherapistPatients: async (): Promise<Patient[]> =>
|
|---|
| 27 | apiClient.get<Patient[]>("/therapists/patients"),
|
|---|
| 28 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.