fix(mobile): typo for version checking
This commit is contained in:
@@ -2,7 +2,6 @@ import fs from "node:fs";
|
|||||||
import { Router } from "express";
|
import { Router } from "express";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { fileURLToPath } from "url";
|
import { fileURLToPath } from "url";
|
||||||
import { getConfig } from "@expo/config";
|
|
||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
@@ -10,9 +9,13 @@ const __filename = fileURLToPath(import.meta.url);
|
|||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
|
const downloadDir = path.resolve(__dirname, "../../downloads/mobile");
|
||||||
const projectRoot = path.resolve("./lstMobile"); // adjust if needed
|
const projectRoot = path.resolve("./lstMobile"); // adjust as needed
|
||||||
|
const appJsonPath = path.join(projectRoot, "app.json");
|
||||||
|
|
||||||
const { exp } = getConfig(projectRoot);
|
const raw = fs.readFileSync(appJsonPath, "utf-8");
|
||||||
|
const config = JSON.parse(raw);
|
||||||
|
|
||||||
|
const exp = config.expo;
|
||||||
|
|
||||||
const currentApk = {
|
const currentApk = {
|
||||||
packageName: exp.android?.package,
|
packageName: exp.android?.package,
|
||||||
@@ -22,7 +25,6 @@ const currentApk = {
|
|||||||
fileName: "lst-mobile.apk",
|
fileName: "lst-mobile.apk",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
router.get("/version", async (req, res) => {
|
router.get("/version", async (req, res) => {
|
||||||
const baseUrl = `${req.protocol}://${req.get("host")}`;
|
const baseUrl = `${req.protocol}://${req.get("host")}`;
|
||||||
|
|
||||||
|
|||||||
889
package-lock.json
generated
889
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -65,7 +65,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dotenvx/dotenvx": "^1.57.0",
|
"@dotenvx/dotenvx": "^1.57.0",
|
||||||
"@expo/config": "^55.0.15",
|
|
||||||
"@scalar/express-api-reference": "^0.9.4",
|
"@scalar/express-api-reference": "^0.9.4",
|
||||||
"@socket.io/admin-ui": "^0.5.1",
|
"@socket.io/admin-ui": "^0.5.1",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user