mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-10-30 01:26:32 +00:00
proper event structure
This commit is contained in:
parent
e2f0163bc2
commit
36956603ed
@ -10,12 +10,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Event struct {
|
type Event struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
PubKey string `json:"pubkey"`
|
||||||
CreatedAt int64 `json:"created_at"`
|
CreatedAt int64 `json:"created_at"`
|
||||||
Kind int `json:"kind"`
|
Kind int `json:"kind"`
|
||||||
Content string `json:"content"`
|
|
||||||
Tags []string `json:"tags"`
|
Tags []string `json:"tags"`
|
||||||
PubKey string `json:"pubkey"`
|
Content string `json:"content"`
|
||||||
ID string `json:"id"`
|
|
||||||
Sig string `json:"sig"`
|
Sig string `json:"sig"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ func handleReq(ws *websocket.Conn, message []interface{}) {
|
|||||||
fmt.Println("Subscription added:", subID)
|
fmt.Println("Subscription added:", subID)
|
||||||
|
|
||||||
// Query the database with filters and send back the results
|
// 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 {
|
if err != nil {
|
||||||
fmt.Println("Error querying events:", err)
|
fmt.Println("Error querying events:", err)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user