Wizard: add support of upload custom repositories

This commit is contained in:
Dominik Vagner 2025-01-22 14:19:27 +01:00 committed by Klara Simickova
parent e21d09b909
commit 048baffc3f
14 changed files with 162 additions and 108 deletions

View file

@ -265,13 +265,8 @@ const Packages = () => {
searchCustomRpms({
apiContentUnitSearchRequest: {
search: debouncedSearchTerm,
urls: customRepositories.flatMap((repo) => {
if (!repo.baseurl) {
throw new Error(
`Repository (id: ${repo.id}, name: ${repo?.name}) is missing baseurl`
);
}
return repo.baseurl;
uuids: customRepositories.flatMap((repo) => {
return repo.id;
}),
},
});
@ -326,13 +321,8 @@ const Packages = () => {
searchCustomGroups({
apiContentUnitSearchRequest: {
search: debouncedSearchTerm.substr(1),
urls: customRepositories?.flatMap((repo) => {
if (!repo.baseurl) {
throw new Error(
`Repository (id: ${repo.id}, name: ${repo?.name}) is missing baseurl`
);
}
return repo.baseurl;
uuids: customRepositories.flatMap((repo) => {
return repo.id;
}),
},
});