Add crud endpoints for notifications (#801)
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/801 Co-authored-by: konrad <konrad@kola-entertainments.de> Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -71,9 +71,7 @@ func InitEvents() (err error) {
|
||||
|
||||
for topic, funcs := range listeners {
|
||||
for _, handler := range funcs {
|
||||
router.AddNoPublisherHandler(topic+"."+handler.Name(), topic, pubsub, func(msg *message.Message) error {
|
||||
return handler.Handle(msg.Payload)
|
||||
})
|
||||
router.AddNoPublisherHandler(topic+"."+handler.Name(), topic, pubsub, handler.Handle)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import "github.com/ThreeDotsLabs/watermill/message"
|
||||
|
||||
// Listener represents something that listens to events
|
||||
type Listener interface {
|
||||
Handle(payload message.Payload) error
|
||||
Handle(msg *message.Message) error
|
||||
Name() string
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user