Files
hydra/src/main/events/profile/process-profile-image.ts
2024-12-23 09:06:14 -03:00

17 lines
438 B
TypeScript

import { registerEvent } from "../register-event";
import { PythonRPC } from "@main/services/python-rpc";
const processProfileImage = async (
_event: Electron.IpcMainInvokeEvent,
path: string
) => {
return PythonRPC.rpc
.post<{
imagePath: string;
mimeType: string;
}>("/profile-image", { image_path: path })
.then((response) => response.data);
};
registerEvent("processProfileImage", processProfileImage);