From dc95e50a8412b4fbc629fd44fcb5c77295583ca8 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Tue, 12 May 2026 12:04:19 -0500 Subject: [PATCH] ci(mobile): added in ehs config to make it more easy for users to update the scanner app on the fly --- backend/mobile/downloadApps.route.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/backend/mobile/downloadApps.route.ts b/backend/mobile/downloadApps.route.ts index 9df15c4..5b8f4cd 100644 --- a/backend/mobile/downloadApps.route.ts +++ b/backend/mobile/downloadApps.route.ts @@ -38,9 +38,28 @@ router.get("/ehs", (_, res) => { } res.setHeader("Content-Type", "application/vnd.android.package-archive"); - res.setHeader("Content-Disposition", `attachment; filename="EHS.apk}"`); + res.setHeader("Content-Disposition", `attachment; filename="EHS.apk"`); return res.sendFile(apkPath); }); +router.get("/ehs/xml", (_, res) => { + const xmlPath = path.join(downloadDir, "enterprisehomescreen.xml"); + + if (!fs.existsSync(xmlPath)) { + return res.status(404).json({ + success: false, + message: "EHS XML not found", + }); + } + + res.setHeader("Content-Type", "application/xml"); + res.setHeader( + "Content-Disposition", + `attachment; filename="enterprisehomescreen.xml"`, + ); + + return res.sendFile(xmlPath); +}); + export default router;