Implement changing of passwords

This commit is contained in:
eikendev 2020-08-02 14:45:24 +02:00
parent d621333b6e
commit e1cd2d2f8e
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
7 changed files with 46 additions and 22 deletions

View file

@ -23,8 +23,8 @@ type NotificationDispatcher interface {
// NotificationHandler holds information for processing requests about notifications.
type NotificationHandler struct {
DB NotificationDatabase
Dispatcher NotificationDispatcher
DB NotificationDatabase
DP NotificationDispatcher
}
// CreateNotification is used to create a new notification for a user.
@ -45,7 +45,7 @@ func (h *NotificationHandler) CreateNotification(ctx *gin.Context) {
}
notification.Date = time.Now()
if success := successOrAbort(ctx, http.StatusInternalServerError, h.Dispatcher.SendNotification(application, &notification)); !success {
if success := successOrAbort(ctx, http.StatusInternalServerError, h.DP.SendNotification(application, &notification)); !success {
return
}