feat: contacts working

This commit is contained in:
2025-04-11 20:31:51 +01:00
parent f89de6db50
commit 9660c99a14
5 changed files with 29 additions and 11 deletions

View File

@@ -107,6 +107,13 @@ func main() {
Data: note,
})
}
for _, contact := range image.Contacts {
dataTypes = append(dataTypes, DataType{
Type: "contact",
Data: contact,
})
}
}
jsonImages, err := json.Marshal(dataTypes)
@@ -210,7 +217,7 @@ func main() {
return
}
userImage, err := imageModel.Process(r.Context(), uuid.MustParse(userId), model.Image{
userImage, err := imageModel.Process(r.Context(), userId, model.Image{
Image: image,
ImageName: imageName,
})

View File

@@ -39,6 +39,8 @@ type ImageWithProperties struct {
}
Notes []model.Notes
Contacts []model.Contacts
}
func getUserIdFromImage(ctx context.Context, dbPool *sql.DB, imageId uuid.UUID) (uuid.UUID, error) {