mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 09:43:57 +00:00
17 lines
380 B
TypeScript
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);
|