[+] add function GetSubscriberByUser for the agenda-widget

This commit is contained in:
2023-09-06 13:34:43 +02:00
parent f06ed52547
commit be0835273e
16 changed files with 551 additions and 1556 deletions

View File

@@ -100,3 +100,14 @@ func (h AgendaHandler) UpdateEvent(event storage.Event) (*storage.Event, error)
return &event, nil
}
func (h AgendaHandler) GetSubscriptionByUser(subscriber string) (results []storage.Subscription, err error) {
if subscriber == "" {
return nil, errors.New("missing subscriber")
}
results, err = h.storage.GetSubscriptionByUser(subscriber)
if err != nil {
return nil, err
}
return results, nil
}