This commit is contained in:
2025-04-14 10:54:24 +02:00
3 changed files with 11 additions and 4 deletions

View File

@ -85,6 +85,8 @@ func main() {
return
}
fmt.Printf("Returned from DB: %+x\n", images)
type DataType struct {
Type string `json:"type"`
Data any `json:"data"`
@ -121,6 +123,8 @@ func main() {
}
}
fmt.Println("DataTypes: ", dataTypes)
jsonImages, err := json.Marshal(dataTypes)
if err != nil {
log.Println(err)

View File

@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"errors"
"fmt"
"log"
"screenmark/screenmark/.gen/haystack/haystack/model"
. "screenmark/screenmark/.gen/haystack/haystack/table"
@ -90,6 +91,8 @@ func (m UserModel) ListWithProperties(ctx context.Context, userId uuid.UUID) ([]
images := []ImageWithProperties{}
err := listWithPropertiesStmt.QueryContext(ctx, m.dbPool, &images)
fmt.Println(images)
if err != nil {
return images, err
}

View File

@ -86,10 +86,10 @@ const eventValidator = strictObject({
StartDateTime: nullable(pipe(string())),
EndDateTime: nullable(pipe(string())),
Description: nullable(string()),
LocationID: nullable(pipe(string(), uuid())),
Location: nullable(locationValidator),
OrganizerID: nullable(pipe(string(), uuid())),
Organizer: nullable(contactValidator),
// LocationID: nullable(pipe(string(), uuid())),
// Location: nullable(locationValidator),
// OrganizerID: nullable(pipe(string(), uuid())),
// Organizer: nullable(contactValidator),
});
const noteValidator = strictObject({