refactor: clean up code

This commit is contained in:
Hachi-R
2024-12-22 20:20:46 -03:00
parent 859d849d36
commit db01980eb8
7 changed files with 15 additions and 37 deletions

View File

@@ -1,11 +1,14 @@
import { registerEvent } from "../register-event";
import { PythonRPC } from "@main/services/python-rpc";
const processProfileImage = async (
_event: Electron.IpcMainInvokeEvent,
path: string
) => {
return path;
// return PythonInstance.processProfileImage(path);
return PythonRPC.rpc.post<{ imagePath: string; mimeType: string }>(
"/profile_image_processor/process_image",
{ path },
);
};
registerEvent("processProfileImage", processProfileImage);