Skip to content

Commit

Permalink
fix(image) create image with alias in custom project
Browse files Browse the repository at this point in the history
Signed-off-by: David Edler <[email protected]>
  • Loading branch information
edlerd committed Oct 11, 2024
1 parent 7583096 commit 6b4dc10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/api/images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ export const createImageFromInstanceSnapshot = (
export const createImageAlias = (
fingerprint: string,
alias: string,
project: string,
): Promise<void> => {
return new Promise((resolve, reject) => {
fetch("/1.0/images/aliases", {
fetch(`/1.0/images/aliases?project=${project}`, {
method: "POST",
body: JSON.stringify({
target: fingerprint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ const CreateImageFromInstanceSnapshotForm: FC<Props> = ({
(event) => {
if (alias) {
const fingerprint = event.metadata.metadata?.fingerprint ?? "";
void createImageAlias(fingerprint, alias).then(notifySuccess);
void createImageAlias(
fingerprint,
alias,
instance.project,
).then(notifySuccess);
} else {
notifySuccess();
}
Expand Down

0 comments on commit 6b4dc10

Please sign in to comment.