Skip to content

Add rest-api endpoint to dismiss a notification #176

@johnhooks

Description

@johnhooks

What problem does this address?

The current rest-api does not support dismissing a notification.

What is your proposed solution?

I propose adding and a new endpoint:

POST /wp-json/wp-notifications/v1/notifications/[NOTIFICATION_ID]

To dismiss the message, the new status should be in the request body, something like:

{
  "status": "dismissed"
}

A combination of the user ID the message ID and the post body will provided all the necessary information to update the message's status in the database.

Metadata

Metadata

Assignees

Labels

[Scope] ServiceThe core logic of the WP Notify project.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions