Merge branch 'fix/notify-links'
This commit is contained in:
commit
1541cc90a9
@ -96,10 +96,10 @@ class SMTP(object):
|
|||||||
key = self.isso.sign(comment["id"])
|
key = self.isso.sign(comment["id"])
|
||||||
|
|
||||||
rv.write("---\n")
|
rv.write("---\n")
|
||||||
rv.write("Kommentar löschen: %s\n" % (uri + "/delete/" + key))
|
rv.write("Delete comment: %s\n" % (uri + "/delete/" + key))
|
||||||
|
|
||||||
if comment["mode"] == 2:
|
if comment["mode"] == 2:
|
||||||
rv.write("Kommentar freischalten: %s\n" % (uri + "/activate/" + key))
|
rv.write("Activate comment: %s\n" % (uri + "/activate/" + key))
|
||||||
|
|
||||||
rv.seek(0)
|
rv.seek(0)
|
||||||
return rv.read()
|
return rv.read()
|
||||||
|
@ -47,6 +47,7 @@ class API(object):
|
|||||||
('edit', ('PUT', '/id/<int:id>')),
|
('edit', ('PUT', '/id/<int:id>')),
|
||||||
('delete', ('DELETE', '/id/<int:id>')),
|
('delete', ('DELETE', '/id/<int:id>')),
|
||||||
('delete', ('GET', '/id/<int:id>/delete/<string:key>')),
|
('delete', ('GET', '/id/<int:id>/delete/<string:key>')),
|
||||||
|
('activate',('GET', '/id/<int:id>/activate/<string:key>')),
|
||||||
('like', ('POST', '/id/<int:id>/like')),
|
('like', ('POST', '/id/<int:id>/like')),
|
||||||
('dislike', ('POST', '/id/<int:id>/dislike')),
|
('dislike', ('POST', '/id/<int:id>/dislike')),
|
||||||
('checkip', ('GET', '/check-ip'))
|
('checkip', ('GET', '/check-ip'))
|
||||||
@ -253,7 +254,7 @@ class API(object):
|
|||||||
resp.headers.add("X-Set-Cookie", cookie("isso-%i" % id))
|
resp.headers.add("X-Set-Cookie", cookie("isso-%i" % id))
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
def activate(self, environ, request, _, key):
|
def activate(self, environ, request, id, key):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
id = self.isso.unsign(key, max_age=2**32)
|
id = self.isso.unsign(key, max_age=2**32)
|
||||||
|
Loading…
Reference in New Issue
Block a user