Files
hydra/src/main/events/user/report-user.ts
Chubby Granny Chaser 8799378bf2 feat: adding user report
2024-09-14 20:55:00 +01:00

17 lines
380 B
TypeScript

import { registerEvent } from "../register-event";
import { HydraApi } from "@main/services";
export const reportUser = async (
_event: Electron.IpcMainInvokeEvent,
userId: string,
reason: string,
description: string
): Promise<void> => {
return HydraApi.post(`/users/${userId}/report`, {
reason,
description,
});
};
registerEvent("reportUser", reportUser);