From 7a78cde6510b76a71a11d8051f547d1608c7b7ac Mon Sep 17 00:00:00 2001 From: WINBIGFOX Date: Mon, 17 Mar 2025 21:39:38 +0100 Subject: [PATCH] Add route to quit the application --- resources/js/electron-plugin/src/server/api/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/electron-plugin/src/server/api/app.ts b/resources/js/electron-plugin/src/server/api/app.ts index 9e88de33..1b49a830 100644 --- a/resources/js/electron-plugin/src/server/api/app.ts +++ b/resources/js/electron-plugin/src/server/api/app.ts @@ -2,6 +2,11 @@ import express from 'express' import { app } from 'electron' const router = express.Router(); +router.post('/quit', (req, res) => { + app.quit() + res.sendStatus(200); +}); + router.post('/show', (req, res) => { app.show() res.sendStatus(200);