MCPcopy
hub / github.com/isso-comments/isso / view

Method view

isso/views/comments.py:483–499  ·  view source on GitHub ↗
(self, environ, request, id)

Source from the content-addressed store, hash-verified

481 """
482
483 def view(self, environ, request, id):
484 rv = self.comments.get(id)
485 if rv is None:
486 raise NotFound
487
488 try:
489 self.isso.unsign(request.cookies.get(str(id), ""))
490 except (SignatureExpired, BadSignature):
491 raise Forbidden
492
493 for key in set(rv.keys()) - API.FIELDS:
494 rv.pop(key)
495
496 if request.args.get("plain", "0") == "0":
497 rv["text"] = self.isso.render(rv["text"])
498
499 return JSON(rv, 200)
500
501 """
502 @api {put} /id/:id edit

Callers 1

insertFunction · 0.80

Calls 4

setFunction · 0.85
unsignMethod · 0.80
getMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected