From c3439e5c79081f7c450db0fcc99cea59b4945f5b Mon Sep 17 00:00:00 2001 From: Joshua Gleitze Date: Fri, 3 Jun 2016 11:06:46 +0200 Subject: [PATCH] apidoc for "delete comment" --- isso/views/comments.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/isso/views/comments.py b/isso/views/comments.py index 24e01fe..5f2bac7 100644 --- a/isso/views/comments.py +++ b/isso/views/comments.py @@ -411,6 +411,21 @@ class API(object): resp.headers.add("X-Set-Cookie", cookie("isso-%i" % rv["id"])) return resp + """ + @api {delete} '/id/:id' delete + @apiGroup Comment + @apiDescription + Delte an existing comment. Deleting a comment is only possible for a short period of time after it was created and only if the requestor has a valid cookie for it. See the [isso server documentation](https://posativ.org/isso/docs/configuration/server) for details. + + @apiParam {number} id + Id of the comment to delete. + + @apiExample {curl} Delete comment with id 14: + curl -X DELETE 'https://comments.example.com/id/14' -b cookie.txt + + @apiSuccessExample Successful deletion returns null: + null + """ @xhr def delete(self, environ, request, id, key=None):