fix: returns correct image ID
This commit is contained in:
@ -32,7 +32,7 @@ type ProcessingImageData struct {
|
|||||||
type ImageWithProperties struct {
|
type ImageWithProperties struct {
|
||||||
ID uuid.UUID
|
ID uuid.UUID
|
||||||
|
|
||||||
Image model.UserImages
|
Image model.Image
|
||||||
|
|
||||||
Tags []model.ImageTags
|
Tags []model.ImageTags
|
||||||
Links []model.ImageLinks
|
Links []model.ImageLinks
|
||||||
@ -156,7 +156,7 @@ func (m ImageModel) Get(ctx context.Context, imageId uuid.UUID) (ImageData, erro
|
|||||||
// TODO: move this to `user.go` model file
|
// TODO: move this to `user.go` model file
|
||||||
func (m ImageModel) ListWithProperties(ctx context.Context, userId uuid.UUID) ([]ImageWithProperties, error) {
|
func (m ImageModel) ListWithProperties(ctx context.Context, userId uuid.UUID) ([]ImageWithProperties, error) {
|
||||||
listWithPropertiesStmt := SELECT(
|
listWithPropertiesStmt := SELECT(
|
||||||
UserImages.ID.AS("UserImagesWithInfo.ID"),
|
UserImages.ID.AS("ImageWithProperties.ID"),
|
||||||
Image.ID,
|
Image.ID,
|
||||||
Image.ImageName,
|
Image.ImageName,
|
||||||
ImageTags.AllColumns,
|
ImageTags.AllColumns,
|
||||||
|
Reference in New Issue
Block a user