mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Implemented notification clear (#720)
* Implemented notification clear * Added the cache clear mechanism * added multi user check test
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user