mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-24 17:33:22 +00:00
readme and config updates
This commit is contained in:
parent
ef0f7a78dd
commit
567f6ec289
@ -1,8 +1,5 @@
|
||||
mongodb:
|
||||
uri: "mongodb://localhost:27017/"
|
||||
database: "grain"
|
||||
collections:
|
||||
event_kind0: "event-kind0"
|
||||
event_kind1: "event-kind1"
|
||||
server:
|
||||
address: ":8080"
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user