diff --git a/backend/models/user.go b/backend/models/user.go index e0bdf03..fc148d8 100644 --- a/backend/models/user.go +++ b/backend/models/user.go @@ -31,7 +31,11 @@ type ImageWithProperties struct { Locations []model.Locations - Events []model.Events + Events []struct { + model.Events + + Location *model.Locations `alias:"Location.*"` + } } func getUserIdFromImage(ctx context.Context, dbPool *sql.DB, imageId uuid.UUID) (uuid.UUID, error) { @@ -86,7 +90,6 @@ func (m UserModel) ListWithProperties(ctx context.Context, userId uuid.UUID) ([] if err != nil { return images, err } - return images, err }