bug fixed
This commit is contained in:
parent
e5041738a8
commit
f28d190793
@ -6,7 +6,7 @@ import {
|
|||||||
getAdminUser,
|
getAdminUser,
|
||||||
getAdminUserById,
|
getAdminUserById,
|
||||||
updateAdminUser,
|
updateAdminUser,
|
||||||
deleteAdminUser, // ✅ Added import
|
deleteAdminUser
|
||||||
} from '@/services/configuration/adminService';
|
} from '@/services/configuration/adminService';
|
||||||
import CustomToast from '@/components/common/CustomToast';
|
import CustomToast from '@/components/common/CustomToast';
|
||||||
import { X } from 'lucide-react';
|
import { X } from 'lucide-react';
|
||||||
|
|||||||
@ -42,13 +42,12 @@ export const getAdminUserById = async (id) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const deleteUnit = async (id) => {
|
export const deleteAdminUser = async (id) => {
|
||||||
try {
|
try {
|
||||||
const response = await deleteRequest(`${UNIT_MASTER_ENDPOINT}/${id}`);
|
const response = await deleteRequest(`${admin}/${id}`);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error deleting unit:', error);
|
console.error('Error deleting admin user:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
Loading…
Reference in New Issue
Block a user