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.
Files changed (2) hide show
  1. package/lib/index.js +4 -4
  2. 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 branchShortName = name2;
98
+ const branchLongName = branchInfo[name2]?.wiki;
99
99
  if (queryString.includes("query titleQuery")) {
100
- variables = { query: param, anyBaseUrl: branchShortName ? [branchShortName] : null };
100
+ variables = { query: param, anyBaseUrl: branchLongName ? [branchLongName] : null };
101
101
  } else if (queryString.includes("query userQuery")) {
102
- variables = { query: param, baseUrl: branchShortName };
102
+ variables = { query: param, baseUrl: branchLongName };
103
103
  } else if (queryString.includes("query userRankQuery")) {
104
- variables = { baseUrl: branchShortName };
104
+ variables = { baseUrl: branchLongName };
105
105
  }
106
106
  try {
107
107
  const response = await fetch(apiList[endpointIndex], {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-crom-querier-modified",
3
3
  "description": "向crom查询并返回文本的插件,自用",
4
- "version": "2.0.2",
4
+ "version": "2.0.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [