mirror of
https://github.com/packwiz/packwiz.git
synced 2025-10-28 01:34:33 +01:00
Change backend request code to use new CurseForge API (WIP)
See the packwiz Discord for more information, as the changes with the new API Terms and Conditions have some implications for packwiz. This commit isn't fully functional yet; I have more changes to make.
This commit is contained in:
@@ -192,7 +192,7 @@ var importCmd = &cobra.Command{
|
||||
|
||||
fmt.Println("Querying Curse API for mod info...")
|
||||
|
||||
modInfos, err := getModInfoMultiple(modIDs)
|
||||
modInfos, err := cfDefaultClient.getModInfoMultiple(modIDs)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to obtain mod information: %s\n", err)
|
||||
os.Exit(1)
|
||||
@@ -236,16 +236,14 @@ var importCmd = &cobra.Command{
|
||||
// 2nd pass: query files that weren't in the previous results
|
||||
fmt.Println("Querying Curse API for file info...")
|
||||
|
||||
modFileInfos, err := getFileInfoMultiple(remainingFileIDs)
|
||||
modFileInfos, err := cfDefaultClient.getFileInfoMultiple(remainingFileIDs)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to obtain mod file information: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
for _, v := range modFileInfos {
|
||||
for _, file := range v {
|
||||
modFileInfosMap[file.ID] = file
|
||||
}
|
||||
modFileInfosMap[v.ID] = v
|
||||
}
|
||||
|
||||
// 3rd pass: create mod files for every file
|
||||
|
||||
Reference in New Issue
Block a user