feat: update cancel mutation to set appointment status to 'cancelled_by_doctor'

This commit is contained in:
hamed
2026-07-07 11:47:43 +03:30
parent fd553b2c4f
commit adbf401ed8
+1 -1
View File
@@ -62,7 +62,7 @@ export default function AppointmentDetailPage() {
});
const cancelMutation = useMutation({
mutationFn: () => api.patch<ApiResponse<null>>(`/api/v1/appointment/${uuid}/cancel`, {}),
mutationFn: () => api.patch<ApiResponse<null>>(`/api/v1/appointment/${uuid}/status`, { status: 'cancelled_by_doctor' }),
onSuccess: () => {
toast.success('نوبت لغو شد');
setCancelOpen(false);