fix(mobile): typo for version checking

This commit is contained in:
2026-04-26 19:51:12 -05:00
parent bddc9aca0d
commit 0b7318f856
3 changed files with 19 additions and 891 deletions

View File

@@ -2,7 +2,6 @@ import fs from "node:fs";
import { Router } from "express";
import path from "path";
import { fileURLToPath } from "url";
import { getConfig } from "@expo/config";
const router = Router();
@@ -10,19 +9,22 @@ const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
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 = {
packageName: exp.android?.package,
versionName: exp.version,
versionCode: exp.android?.versionCode,
minSupportedVersionCode: 1, // keep this custom if needed
fileName: "lst-mobile.apk",
packageName: exp.android?.package,
versionName: exp.version,
versionCode: exp.android?.versionCode,
minSupportedVersionCode: 1, // keep this custom if needed
fileName: "lst-mobile.apk",
};
router.get("/version", async (req, res) => {
const baseUrl = `${req.protocol}://${req.get("host")}`;