feat: update cancel mutation to set appointment status to 'cancelled_by_doctor'
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user