appointment creation fixed
This commit is contained in:
@@ -153,10 +153,10 @@ export default function Dashboard() {
|
||||
|
||||
const isLoading = isLoadingPatients || addPatientMutation.isPending;
|
||||
|
||||
// Create appointment mutation
|
||||
// Create/upsert appointment mutation
|
||||
const createAppointmentMutation = useMutation({
|
||||
mutationFn: async (appointment: InsertAppointment) => {
|
||||
const res = await apiRequest("POST", "/api/appointments/", appointment);
|
||||
const res = await apiRequest("POST", "/api/appointments/upsert", appointment);
|
||||
return await res.json();
|
||||
},
|
||||
onSuccess: () => {
|
||||
|
||||
Reference in New Issue
Block a user