Added time Ban and penalty

This commit is contained in:
PxlLoewe
2025-06-19 11:48:45 -07:00
parent e40cf0ffac
commit 4732ecb770
15 changed files with 327 additions and 56 deletions

View File

@@ -29,9 +29,19 @@ export const getConnectedAircraftPositionLogAPI = async ({ id }: { id: number })
return res.data;
};
export const kickAircraftAPI = async ({ id, bann }: { id: number; bann?: boolean }) => {
export const kickAircraftAPI = async ({
id,
bann,
reason,
until = null,
}: {
id: number;
bann?: boolean;
reason: string;
until?: Date | null;
}) => {
const res = await serverApi.delete(`/aircrafts/${id}`, {
data: { bann },
data: { bann, reason, until },
});
console.log(res.status);
if (res.status != 204) {

View File

@@ -25,9 +25,19 @@ export const getConnectedDispatcherAPI = async (filter?: Prisma.ConnectedDispatc
return res.data;
};
export const kickDispatcherAPI = async ({ id, bann }: { id: number; bann?: boolean }) => {
export const kickDispatcherAPI = async ({
id,
bann,
reason,
until = null,
}: {
id: number;
bann?: boolean;
reason: string;
until?: Date | null;
}) => {
const res = await serverApi.delete(`/dispatcher/${id}`, {
data: { bann },
data: { bann, reason, until },
});
console.log(res.status);
if (res.status != 204) {