-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store/backendApi: export the relevant store api
Since the implementation of the cockpitApi and imageBuilderApi are different, we should make sure to export the correct one depending on the environment we are in.
- Loading branch information
1 parent
79532e4
commit 3e69859
Showing
5 changed files
with
29 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
import { useGetBlueprintsQuery as useCockpitGetBlueprintsQuery } from './cockpitApi'; | ||
import { useGetBlueprintsQuery as useImageBuilderGetBlueprintsQuery } from './imageBuilderApi'; | ||
import { | ||
useGetBlueprintsQuery as useCockpitGetBlueprintsQuery, | ||
useDeleteBlueprintMutation as useCockpitDeleteMutation, | ||
} from './cockpitApi'; | ||
import { cockpitApi } from './enhancedCockpitApi'; | ||
import { imageBuilderApi } from './enhancedImageBuilderApi'; | ||
import { | ||
useGetBlueprintsQuery as useImageBuilderGetBlueprintsQuery, | ||
useDeleteBlueprintMutation as useImageBuilderDeleteMutation, | ||
} from './imageBuilderApi'; | ||
|
||
export const useGetBlueprintsQuery = process.env.IS_ON_PREMISE | ||
? useCockpitGetBlueprintsQuery | ||
: useImageBuilderGetBlueprintsQuery; | ||
|
||
export const useDeleteBlueprintMutation = process.env.IS_ON_PREMISE | ||
? useCockpitDeleteMutation | ||
: useImageBuilderDeleteMutation; | ||
|
||
export const backendApi = process.env.IS_ON_PREMISE | ||
? cockpitApi | ||
: imageBuilderApi; |
3e69859
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have requested the
builder
permissions for the @osbuild/cockpit-image-builder-main Copr project.Please confirm the request on the @osbuild/cockpit-image-builder-main Copr project permissions page and retrigger the build by clicking on a
Re-run
button or with a/packit build
pull-request comment (for builds in pull-requests).