Skip to content

Commit

Permalink
Use query params in list all notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
olmar committed Dec 2, 2014
1 parent e0eacd9 commit ee1dec2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions notesapi/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def get(self, request, *args, **kwargs):
"""
Search annotations.
This method supports the limit and offset query parameters for paging through results.
This method supports the limit and offset query parameters for paging
through results.
"""
params = request.QUERY_PARAMS.dict()

Expand Down Expand Up @@ -60,10 +61,9 @@ def get(self, request, *args, **kwargs):
"""
Get a list of all annotations.
"""
# TODO: get user when auth will be done.
user = None
kwargs['query'] = request.QUERY_PARAMS.dict()

annotations = Annotation.search(user)
annotations = Annotation.search(**kwargs)

return Response(annotations)

Expand Down

0 comments on commit ee1dec2

Please sign in to comment.