edit events proto en events.go for visualize history
This commit is contained in:
@@ -63,6 +63,8 @@ func (s MongoDBStorage) GetEvent(id string) (*Event, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fmt.Printf("%+v\n", event)
|
||||
|
||||
return event, nil
|
||||
}
|
||||
|
||||
@@ -132,7 +134,7 @@ func (s MongoDBStorage) UpdateSubscription(eventid string, subscriber string, de
|
||||
for i := range event.Subscriptions {
|
||||
if event.Subscriptions[i].Subscriber == subscriber {
|
||||
filter := bson.M{"_id": eventid}
|
||||
push := bson.M{"$push": bson.M{"deletesubscriptions": deletesubscription}}
|
||||
push := bson.M{"$push": bson.M{"deletedsubscriptions": deletesubscription}}
|
||||
pull := bson.M{"$pull": bson.M{"subscriptions": bson.M{"subscriber": subscriber}}}
|
||||
_, er := collection.UpdateOne(context.TODO(), filter, push)
|
||||
if _, err := collection.UpdateOne(context.TODO(), filter, pull); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user