forked from rDrama/rDrama
master
parent
05b6b8a0ea
commit
cefb2cfad0
|
@ -767,11 +767,9 @@ def delete_comment(cid, v):
|
||||||
|
|
||||||
c = g.db.query(Comment).options(lazyload('*')).filter_by(id=cid).first()
|
c = g.db.query(Comment).options(lazyload('*')).filter_by(id=cid).first()
|
||||||
|
|
||||||
if not c:
|
if not c: abort(404)
|
||||||
abort(404)
|
|
||||||
|
|
||||||
if not c.author_id == v.id:
|
if not c.author_id == v.id: abort(403)
|
||||||
abort(403)
|
|
||||||
|
|
||||||
c.deleted_utc = int(time.time())
|
c.deleted_utc = int(time.time())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue