mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-25 03:41:02 +00:00
17 lines
438 B
TypeScript
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);
|