Skip to content

Instantly share code, notes, and snippets.

@TimonVS
Last active April 7, 2016 15:59
Show Gist options
  • Save TimonVS/da3e95fbe4d97bc7b500c09e81292d78 to your computer and use it in GitHub Desktop.
Save TimonVS/da3e95fbe4d97bc7b500c09e81292d78 to your computer and use it in GitHub Desktop.

Mark items as read

We want to be able to track if a user has viewed/read an item. To do this we need a new endpoint.

My suggestion is to make the endpoint PATCH /items/mark-seen, the patch request body will contain an array of item ids.

E.g.:

{ 
  items: ['item id here', 'item id here']
}

There's already a PR on the front-end: https://github.com/shareworks/projectcampus-web/pull/266.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment