improvement: appointment dialog UX improved.
This commit is contained in:
@@ -14,7 +14,12 @@ export const patientsApi = {
|
||||
},
|
||||
|
||||
create: async (data: CreatePatientInput): Promise<CreatePatientResponse> => {
|
||||
const response = await apiClient.post('/patients', data);
|
||||
const { email, ...rest } = data;
|
||||
const body = {
|
||||
...rest,
|
||||
...(email?.trim() ? { email: email.trim() } : {}),
|
||||
};
|
||||
const response = await apiClient.post('/patients', body);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user