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

Commit f0448b3

Browse files
authored
Close printWindow and return code 200
1 parent 2ace99c commit f0448b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/server/api/system.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ router.post('/print-to-pdf', async (req, res) => {
6060
writeFile(path, data, (e) => {
6161
if (e) throw error;
6262
});
63+
64+
printWindow.close();
65+
res.sendStatus(200);
6366
}).catch(e => {
67+
printWindow.close();
68+
6469
res.status(400).json({
6570
error: e.message,
6671
});

0 commit comments

Comments
 (0)