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

View File

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

View File

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