diff options
Diffstat (limited to 'internal/processing')
-rw-r--r-- | internal/processing/notification.go | 9 | ||||
-rw-r--r-- | internal/processing/processor.go | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/internal/processing/notification.go b/internal/processing/notification.go index 9b99141a6..66b967afa 100644 --- a/internal/processing/notification.go +++ b/internal/processing/notification.go @@ -58,3 +58,12 @@ func (p *processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, li Limit: limit, }) } + +func (p *processor) NotificationsClear(ctx context.Context, authed *oauth.Auth) gtserror.WithCode { + err := p.db.ClearNotifications(ctx, authed.Account.ID) + if err != nil { + return gtserror.NewErrorInternalError(err) + } + + return nil +} diff --git a/internal/processing/processor.go b/internal/processing/processor.go index 5a4abb55b..a6e47bed8 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -155,6 +155,8 @@ type Processor interface { // NotificationsGet NotificationsGet(ctx context.Context, authed *oauth.Auth, limit int, maxID string, sinceID string) (*apimodel.TimelineResponse, gtserror.WithCode) + // NotificationsClear + NotificationsClear(ctx context.Context, authed *oauth.Auth) gtserror.WithCode OAuthHandleTokenRequest(r *http.Request) (map[string]interface{}, gtserror.WithCode) OAuthHandleAuthorizeRequest(w http.ResponseWriter, r *http.Request) error |