From 567f6ec2896687bc0a69d6c557fe284b94fe6680 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Tue, 23 Jul 2024 11:07:43 -0400 Subject: [PATCH] readme and config updates --- config.example.yml | 3 --- readme.md | 1 - server/server.go | 3 ++- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config.example.yml b/config.example.yml index a3bf0cd..e578e43 100644 --- a/config.example.yml +++ b/config.example.yml @@ -1,8 +1,5 @@ mongodb: uri: "mongodb://localhost:27017/" database: "grain" -collections: - event_kind0: "event-kind0" - event_kind1: "event-kind1" server: address: ":8080" diff --git a/readme.md b/readme.md index 51c8bc7..5f03a52 100644 --- a/readme.md +++ b/readme.md @@ -29,7 +29,6 @@ cp config.example.yml config.yml ### TODO -- merge event and db package into server package. - Handle more kinds - create whitelist/blacklist functionality for: diff --git a/server/server.go b/server/server.go index 316d3bc..52f7364 100644 --- a/server/server.go +++ b/server/server.go @@ -81,7 +81,7 @@ func handleEvent(ws *websocket.Conn, message []interface{}) { return } - // Call the HandleKind function from the events package + // Call the HandleKind function HandleKind(context.TODO(), evt, ws) fmt.Println("Event processed:", evt.ID) @@ -155,6 +155,7 @@ func handleReq(ws *websocket.Conn, message []interface{}) { fmt.Println("Subscription added:", subID) // Query the database with filters and send back the results + // TO DO why is this taking a certain kind as an argument for collection??? queriedEvents, err := QueryEvents(filters, db.GetClient(), "grain", "event-kind1") if err != nil { fmt.Println("Error querying events:", err)