ci(mobile): added in ehs config to make it more easy for users to update the scanner app on the fly
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user