Skip to content

Commit

Permalink
fixup! incusd/images: Add support for all_projects
Browse files Browse the repository at this point in the history
  • Loading branch information
MaheshPunjabi committed Feb 3, 2024
1 parent dd56a33 commit 384204e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/server/db/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions shared/api/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 384204e

Please sign in to comment.