Skip to content

Commit

Permalink
feat: PLATFORM
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Nov 18, 2024
1 parent 790ccde commit 1e82759
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
// 解析格式
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
const PLATFORM = ["Location", "Maps"];
if (url.searchParams.get("os") === "watchos") PLATFORM.push("Watch");
log(`⚠ PLATFORM: ${PLATFORM}`, "");
!(async () => {
/**
* @type {{Settings: import('./interface').Settings}}
*/
const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database);
const { Settings, Caches, Configs } = setENV("iRingo", PLATFORM, database);
// 创建空数据
let body = {};
// 格式判断
Expand Down
5 changes: 4 additions & 1 deletion src/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
// 解析格式
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
const PLATFORM = ["Location", "Maps"];
if (url.searchParams.get("os") === "watchos") PLATFORM.push("Watch");
log(`⚠ PLATFORM: ${PLATFORM}`, "");
!(async () => {
/**
* @type {{Settings: import('./interface').Settings}}
*/
const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database);
const { Settings, Caches, Configs } = setENV("iRingo", PLATFORM, database);
// 创建空数据
let body = {};
// 格式判断
Expand Down

0 comments on commit 1e82759

Please sign in to comment.