Skip to content

Commit 1e82759

Browse files
committed
feat: PLATFORM
1 parent 790ccde commit 1e82759

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/response.dev.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
1717
// 解析格式
1818
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
1919
log(`⚠ FORMAT: ${FORMAT}`, "");
20+
const PLATFORM = ["Location", "Maps"];
21+
if (url.searchParams.get("os") === "watchos") PLATFORM.push("Watch");
22+
log(`⚠ PLATFORM: ${PLATFORM}`, "");
2023
!(async () => {
2124
/**
2225
* @type {{Settings: import('./interface').Settings}}
2326
*/
24-
const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database);
27+
const { Settings, Caches, Configs } = setENV("iRingo", PLATFORM, database);
2528
// 创建空数据
2629
let body = {};
2730
// 格式判断

src/response.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
1616
// 解析格式
1717
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
1818
log(`⚠ FORMAT: ${FORMAT}`, "");
19+
const PLATFORM = ["Location", "Maps"];
20+
if (url.searchParams.get("os") === "watchos") PLATFORM.push("Watch");
21+
log(`⚠ PLATFORM: ${PLATFORM}`, "");
1922
!(async () => {
2023
/**
2124
* @type {{Settings: import('./interface').Settings}}
2225
*/
23-
const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database);
26+
const { Settings, Caches, Configs } = setENV("iRingo", PLATFORM, database);
2427
// 创建空数据
2528
let body = {};
2629
// 格式判断

0 commit comments

Comments
 (0)