an app.bsky.* indexer

use json.RawMessage

Changed files
+3 -2
cmd
monarch
+3 -2
cmd/monarch/handlers.go
···
import (
"context"
+
"encoding/json"
"fmt"
"github.com/bluesky-social/indigo/atproto/syntax"
···
Repo string
Collection string
Key string
-
Data []byte `gorm:"type:jsonb"`
+
Data json.RawMessage `gorm:"type:jsonb"`
}
func NewHandlerService(store *gorm.DB) *HandlerService {
···
Repo: repo,
Collection: string(uri.Collection()),
Key: string(uri.RecordKey()),
-
Data: *rec,
+
Data: json.RawMessage(*rec),
}).Error; err != nil {
return err
}