mirror of
https://github.com/woodchen-ink/random-api-go.git
synced 2025-07-18 05:42:01 +08:00
fix(album_mapping.json): 移除不再使用的相册ID,更新生成CSV的逻辑以读取本地配置
This commit is contained in:
parent
bd5f86d928
commit
54067cd123
@ -3,5 +3,5 @@
|
||||
"pic/ai.csv": ["18"],
|
||||
"pic/fj.csv": ["16"],
|
||||
"pic/ecy.csv": ["14"],
|
||||
"pic/truegirl.csv": ["10","21","22","23","24","25","26","27","28","29"]
|
||||
"pic/truegirl.csv": ["10"]
|
||||
}
|
||||
|
@ -37,17 +37,10 @@ func main() {
|
||||
panic("API_TOKEN environment variable is required")
|
||||
}
|
||||
|
||||
// 从远程获取相册映射配置
|
||||
resp, err := http.Get("https://github-file-2mq.pages.dev/random-api.czl.net/album_mapping.json")
|
||||
// 读取本地的相册映射配置
|
||||
mappingFile, err := os.ReadFile("lankong_tools/album_mapping.json")
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Failed to fetch album mapping: %v", err))
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
// 读取响应内容
|
||||
mappingFile, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Failed to read album mapping response: %v", err))
|
||||
panic(fmt.Sprintf("Failed to read album mapping file: %v", err))
|
||||
}
|
||||
|
||||
var albumMapping AlbumMapping
|
||||
|
Loading…
x
Reference in New Issue
Block a user