From 384204e4ea5529c4214da46849660df25b0523b6 Mon Sep 17 00:00:00 2001 From: Mahesh Punjabi Date: Fri, 2 Feb 2024 22:39:46 -0500 Subject: [PATCH] fixup! incusd/images: Add support for all_projects --- internal/server/db/images.go | 1 + shared/api/image.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/internal/server/db/images.go b/internal/server/db/images.go index ff42e449ae7..d735e288f54 100644 --- a/internal/server/db/images.go +++ b/internal/server/db/images.go @@ -400,6 +400,7 @@ func (c *ClusterTx) GetImageByFingerprintPrefix(ctx context.Context, fingerprint image.Cached = object.Cached image.Public = object.Public image.AutoUpdate = object.AutoUpdate + image.Project = object.Project err = c.imageFill( ctx, object.ID, &image, diff --git a/shared/api/image.go b/shared/api/image.go index b5a8807acdc..e1537b761e2 100644 --- a/shared/api/image.go +++ b/shared/api/image.go @@ -179,6 +179,10 @@ type Image struct { // When the image was added to this server // Example: 2021-03-24T14:18:15.115036787-04:00 UploadedAt time.Time `json:"uploaded_at" yaml:"uploaded_at"` + + // Project name + // Example: project1 + Project string `json:"project" yaml:"project"` } // Writable converts a full Image struct into a ImagePut struct (filters read-only fields).