proper event structure

This commit is contained in:
Chris kerr 2024-07-20 09:04:45 -04:00
parent e2f0163bc2
commit 36956603ed
2 changed files with 4 additions and 4 deletions

View File

@ -10,12 +10,12 @@ import (
)
type Event struct {
ID string `json:"id"`
PubKey string `json:"pubkey"`
CreatedAt int64 `json:"created_at"`
Kind int `json:"kind"`
Content string `json:"content"`
Tags []string `json:"tags"`
PubKey string `json:"pubkey"`
ID string `json:"id"`
Content string `json:"content"`
Sig string `json:"sig"`
}

View File

@ -146,7 +146,7 @@ func handleReq(ws *websocket.Conn, message []interface{}) {
fmt.Println("Subscription added:", subID)
// Query the database with filters and send back the results
events, err := QueryEvents(filters, client, "grain", "event-kind0")
events, err := QueryEvents(filters, client, "grain", "event-kind1")
if err != nil {
fmt.Println("Error querying events:", err)
return