Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 7541516

Browse files
authored
Merge pull request #22 from shomisha/feature/reload-window
Reloading windows
2 parents 03be821 + 6994ae9 commit 7541516

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

dist/server/api/window.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ router.post('/position', (req, res) => {
2828
(_a = state_1.default.windows[id]) === null || _a === void 0 ? void 0 : _a.setPosition(parseInt(x), parseInt(y), animate);
2929
res.sendStatus(200);
3030
});
31+
router.post('/reload', (req, res) => {
32+
var _a;
33+
const { id } = req.body;
34+
(_a = state_1.default.windows[id]) === null || _a === void 0 ? void 0 : _a.reload();
35+
res.sendStatus(200);
36+
});
3137
router.post('/close', (req, res) => {
3238
const { id } = req.body;
3339
if (state_1.default.windows[id]) {

src/server/api/window.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ router.post('/position', (req, res) => {
3030
res.sendStatus(200)
3131
})
3232

33+
router.post('/reload', (req, res) => {
34+
const {id} = req.body
35+
state.windows[id]?.reload()
36+
37+
res.sendStatus(200)
38+
});
39+
3340
router.post('/close', (req, res) => {
3441
const {id} = req.body
3542

0 commit comments

Comments
 (0)