koishi-plugin-crom-querier-modified 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -95,13 +95,13 @@ async function cromApiRequest(param, name2, endpointIndex = 0, queryString) {
|
|
|
95
95
|
throw new Error("所有API端点均已尝试但均失败");
|
|
96
96
|
}
|
|
97
97
|
let variables = {};
|
|
98
|
-
const
|
|
98
|
+
const branchLongName = branchInfo[name2]?.wiki;
|
|
99
99
|
if (queryString.includes("query titleQuery")) {
|
|
100
|
-
variables = { query: param, anyBaseUrl:
|
|
100
|
+
variables = { query: param, anyBaseUrl: branchLongName ? [branchLongName] : null };
|
|
101
101
|
} else if (queryString.includes("query userQuery")) {
|
|
102
|
-
variables = { query: param, baseUrl:
|
|
102
|
+
variables = { query: param, baseUrl: branchLongName };
|
|
103
103
|
} else if (queryString.includes("query userRankQuery")) {
|
|
104
|
-
variables = { baseUrl:
|
|
104
|
+
variables = { baseUrl: branchLongName };
|
|
105
105
|
}
|
|
106
106
|
try {
|
|
107
107
|
const response = await fetch(apiList[endpointIndex], {
|