适配QX TF 390+特性

This commit is contained in:
Peng-YM
2020-10-04 10:37:04 +08:00
parent 77ec9c6953
commit ea7f208882
6 changed files with 51 additions and 6 deletions

View File

@@ -94,6 +94,18 @@ $app.route("/api/storage")
.get(exportData)
.post(importData);
$app.get("/api/env", async (req, res) => {
const {isNode, isQX, isLoon, isSurge} = ENV();
let backend = "Node";
if (isNode) backend = "Node";
if (isQX) backend = "QX";
if (isLoon) backend = "Loon";
if (isSurge) backend = "Surge";
res.json({
backend
});
});
$app.all("/", async (req, res) => {
res.send("Hello from Sub-Store! Made with ❤️ by Peng-YM.");
});