Refactor Filter options into a struct

It was already a lot of options for one method and I am going to add
another one in the next commit.
This commit is contained in:
Gordian Schoenherr
2024-11-26 16:19:23 +09:00
parent 88ef8efba5
commit 3b785e4165
12 changed files with 167 additions and 71 deletions
+8 -1
View File
@@ -636,7 +636,14 @@ func apiSnapshotsPull(c *gin.Context) {
}
// Filter with dependencies as requested
destinationPackageList, err := sourcePackageList.FilterWithProgress(queries, !noDeps, toPackageList, context.DependencyOptions(), architecturesList, context.Progress())
destinationPackageList, err := sourcePackageList.Filter(deb.FilterOptions{
Queries: queries,
WithDependencies: !noDeps,
Source: toPackageList,
DependencyOptions: context.DependencyOptions(),
Architectures: architecturesList,
Progress: context.Progress(),
})
if err != nil {
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
}