sdfsfd
This commit is contained in:
parent
5f2d2066c6
commit
2466a4a782
3 changed files with 4 additions and 3 deletions
|
@ -265,14 +265,14 @@ class Comment(Base):
|
||||||
data= {'is_banned': True,
|
data= {'is_banned': True,
|
||||||
'ban_reason': self.ban_reason,
|
'ban_reason': self.ban_reason,
|
||||||
'id': self.id,
|
'id': self.id,
|
||||||
'post': self.post.id,
|
'post': self.post.id if self.post else 0,
|
||||||
'level': self.level,
|
'level': self.level,
|
||||||
'parent': self.parent_fullname
|
'parent': self.parent_fullname
|
||||||
}
|
}
|
||||||
elif self.deleted_utc > 0:
|
elif self.deleted_utc > 0:
|
||||||
data= {'deleted_utc': self.deleted_utc,
|
data= {'deleted_utc': self.deleted_utc,
|
||||||
'id': self.id,
|
'id': self.id,
|
||||||
'post': self.post.id,
|
'post': self.post.id if self.post else 0,
|
||||||
'level': self.level,
|
'level': self.level,
|
||||||
'parent': self.parent_fullname
|
'parent': self.parent_fullname
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,7 @@ def notifications(v):
|
||||||
if c not in listing:
|
if c not in listing:
|
||||||
listing.append(c)
|
listing.append(c)
|
||||||
|
|
||||||
|
if request.headers.get("Authorization"): return {"data":[x.json for x in listing]}
|
||||||
|
|
||||||
return render_template("notifications.html",
|
return render_template("notifications.html",
|
||||||
v=v,
|
v=v,
|
||||||
|
|
|
@ -249,7 +249,7 @@ def searchcomments(v):
|
||||||
|
|
||||||
comments = get_comments(ids, v=v)
|
comments = get_comments(ids, v=v)
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return [x.json for x in comments]
|
if request.headers.get("Authorization"): return {"data":[x.json for x in comments]}
|
||||||
else: return render_template("search_comments.html", v=v, query=query, total=total, page=page, comments=comments, sort=sort, t=t, next_exists=next_exists)
|
else: return render_template("search_comments.html", v=v, query=query, total=total, page=page, comments=comments, sort=sort, t=t, next_exists=next_exists)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue