mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-11 14:25:12 +02:00
13 lines
361 B
TypeScript
13 lines
361 B
TypeScript
import { BrowserWindow } from "electron";
|
|
import { Response } from "express";
|
|
|
|
/**
|
|
* Shorthand to handle a fire and forget global event
|
|
* @param {*} res
|
|
* @param {*} action
|
|
*/
|
|
export const handleWindowEvent = (mainWindow: BrowserWindow) => (res: Response, action: string) => {
|
|
mainWindow.webContents.send("globalEvent", action);
|
|
res.sendStatus(200);
|
|
};
|