feat(api): 根据用户是否有视频动态切换不同的token
构建上传工具 / build (push) Successful in 1m26s

- 添加了 gjson 库用于解析 JSON 数据
- 修改循环语法从传统的 for i := 0; i < n; i++ 到 range 语法
- 实现了 CheckHasVideo 函数来检查用户是否有视频作品
- 根据用户是否有视频动态选择 HasVideoToken 或 NoVideoToken
- 添加了新的 HTTP 请求头配置用于 API 调用
- 更新了依赖包并添加了相关间接依赖
This commit is contained in:
2026-07-26 22:41:34 +08:00
parent 70c903f876
commit 8889e9ab55
3 changed files with 63 additions and 3 deletions
+3
View File
@@ -5,6 +5,7 @@ go 1.26
require (
github.com/fsnotify/fsnotify v1.9.0
github.com/spf13/viper v1.21.0
github.com/tidwall/gjson v1.14.2
github.com/wailsapp/wails/v2 v2.12.0
golang.org/x/sync v0.20.0
)
@@ -37,6 +38,8 @@ require (
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect