mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-24 03:11:03 +00:00
refactor: clean up code
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user