bug fixed

This commit is contained in:
Malini 2025-11-06 11:59:32 +05:30
parent e5041738a8
commit f28d190793
2 changed files with 4 additions and 5 deletions

View File

@ -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';

View File

@ -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;
} }
}; };