Skip to content

Commit

Permalink
feat: hide cpu arch not compatible app
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH committed Jul 5, 2024
1 parent b0b2c3b commit 226c38c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions route/v2/appstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ func (a *AppManagement) ComposeAppStoreInfoList(ctx echo.Context, params codegen
return *storeInfo
})

// filter cpu not support
currentCPUArch := "amd64"
list = lo.PickBy(list, func(_ string, storeInfo codegen.ComposeAppStoreInfo) bool {
return lo.Contains(*storeInfo.Architectures, currentCPUArch)
})

data := &codegen.ComposeAppStoreInfoLists{
List: &list,
}
Expand Down

0 comments on commit 226c38c

Please sign in to comment.