add logic to store event modification and deleted event
This commit is contained in:
@@ -70,3 +70,24 @@ func (h AgendaHandler) SubscribeEvent(eventid string, subscriber string, data ma
|
||||
err = h.storage.AddSubscription(eventid, subscription)
|
||||
return
|
||||
}
|
||||
|
||||
// func (h AgendaHandler) UnsubscribeEvent(eventid string, subscriber string) (err error) {
|
||||
// if eventid == "" || subscriber == "" {
|
||||
// return errors.New("missing eventid or subscriber")
|
||||
// }
|
||||
// event, err = h.storage.GetEvent(eventid)
|
||||
// for i := 0; i < event.Subscriptions; i++ {
|
||||
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
|
||||
func (h AgendaHandler) UpdateEvent(event storage.Event) (*storage.Event, error) {
|
||||
|
||||
// Store the account
|
||||
if err := h.storage.UpdateEvent(event); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &event, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user