Skip to content

Commit e581f16

Browse files
authored
Add routes for managing app open-at-login settings (#182)
1 parent 368427c commit e581f16

File tree

1 file changed

+13
-0
lines changed
  • resources/js/electron-plugin/src/server/api

1 file changed

+13
-0
lines changed

resources/js/electron-plugin/src/server/api/app.ts

+13
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,17 @@ router.delete('/recent-documents', (req, res) => {
6363
res.sendStatus(200);
6464
});
6565

66+
router.post('/open-at-login', (req, res) => {
67+
app.setLoginItemSettings({
68+
openAtLogin: req.body.open,
69+
});
70+
res.sendStatus(200);
71+
});
72+
73+
router.get('/open-at-login', (req, res) => {
74+
res.json({
75+
open: app.getLoginItemSettings().openAtLogin,
76+
});
77+
});
78+
6679
export default router;

0 commit comments

Comments
 (0)