Completed Admin Users form
This commit is contained in:
@@ -35,3 +35,14 @@ export const getConnectedDispatcherAPI = async (filter?: Prisma.ConnectedDispatc
|
||||
}
|
||||
return res.data;
|
||||
};
|
||||
|
||||
export const kickDispatcherAPI = async ({ id, bann }: { id: number; bann?: boolean }) => {
|
||||
const res = await serverApi.delete(`/dispatcher/${id}`, {
|
||||
data: { bann },
|
||||
});
|
||||
console.log(res.status);
|
||||
if (res.status != 204) {
|
||||
throw new Error("Failed to kick aircraft");
|
||||
}
|
||||
return res.data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user