dsh-shlr-bilitoolkit 0.1.21 → 0.1.22

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.
@@ -133,7 +133,7 @@ export class DynamicAPI {
133
133
  });
134
134
  const data = resp?.data ?? {};
135
135
  const raw = data.data;
136
- const url = typeof raw === "string" ? raw : raw?.url;
136
+ const url = typeof raw === "string" ? raw : (raw?.image_url ?? raw?.url);
137
137
  if (data.code !== 0 || !url) {
138
138
  throw new BiliApiError(`图片上传失败: ${data.message ?? "接口未返回 url"}`, data.code, raw);
139
139
  }
@@ -83,7 +83,7 @@ export class ProfileAPI {
83
83
  });
84
84
  const data = resp?.data ?? {};
85
85
  const raw = data.data;
86
- const url = typeof raw === "string" ? raw : raw?.url;
86
+ const url = typeof raw === "string" ? raw : (raw?.image_url ?? raw?.url);
87
87
  if (data.code !== 0 || !url) {
88
88
  throw new BiliApiError(`头像图片上传失败: ${data.message ?? "接口未返回 url"}`, data.code, raw);
89
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-shlr-bilitoolkit",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "深海猎人专用B站接口工具箱 dsh 插件。",
5
5
  "type": "module",
6
6
  "main": "dist/dsh.js",