Skip to content

Commit

Permalink
views: comments: Remove obsolete /count GET endpoint
Browse files Browse the repository at this point in the history
The REMOVEME has been in the code for quite a while and a
better substitute exists.
  • Loading branch information
ix5 committed May 26, 2022
1 parent 70ed7c7 commit fd1434f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
7 changes: 5 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ Changelog for Isso
to style comments and replies made by the page's author(s).
- Add Ukrainian localisation (`#878`_, okawo80085)
- Enable Turkish localisation (`#879`_, okawo80085)
- Add ``/config`` endpoint for fetching server configuration options that
affect the client
- **API:**

- Add ``/config`` endpoint for fetching server configuration options that
affect the client
- Remove ``/count`` GET endpoint (use POST instead)

.. _Gravatar: Image requests: http://en.gravatar.com/site/implement/images/
.. _879: https://github.com/posativ/isso/pull/879
Expand Down
12 changes: 0 additions & 12 deletions isso/views/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class API(object):
VIEWS = [
('fetch', ('GET', '/')),
('new', ('POST', '/new')),
('count', ('GET', '/count')),
('counts', ('POST', '/count')),
('feed', ('GET', '/feed')),
('latest', ('GET', '/latest')),
Expand Down Expand Up @@ -1037,17 +1036,6 @@ def preview(self, environment, request):

return JSON({'text': self.isso.render(data["text"])}, 200)

# TODO: remove someday (replaced by :func:`counts`)
@requires(str, 'uri')
def count(self, environ, request, uri):

rv = self.comments.count(uri)[0]

if rv == 0:
raise NotFound

return JSON(rv, 200)

"""
@api {post} /count Count comments
@apiGroup Thread
Expand Down

0 comments on commit fd1434f

Please sign in to comment.