Commit e66dea81 authored by Sean Hammond's avatar Sean Hammond

Disable NIPSA-filtering on annotation permalink pages

When on individual annotation pages like /a/<annotation_id> make an API
request to /api/annotations/<annotaion_id> instead of to the search API.
This bypasses the search API's NIPSA-filtering.

If you have a direct link to an annotations individual page, then you
can see the annotation (and all its replies) regardless of whether
anything is NIPSA'd or any user is logged-in.
parent 10b64ab7
......@@ -24,8 +24,8 @@ module.exports = class AnnotationViewerController
$location.path('/stream').search('q', query)
id = $routeParams.id
store.SearchResource.get _id: id, ({rows}) ->
annotationMapper.loadAnnotations(rows)
store.AnnotationResource.read id: id, (annotation) ->
annotationMapper.loadAnnotations([annotation])
$scope.threadRoot = children: [$scope.threading.getContainer(id)]
store.SearchResource.get references: id, ({rows}) ->
annotationMapper.loadAnnotations(rows)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment