dfdf
This commit is contained in:
parent
40a09d8542
commit
7997970e03
6 changed files with 0 additions and 40 deletions
|
@ -43,7 +43,6 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
deleted_utc = Column(Integer, default=0)
|
||||
is_approved = Column(Integer, default=0)
|
||||
approved_utc = Column(Integer, default=0)
|
||||
creation_ip = Column(String(64), default='')
|
||||
level = Column(Integer, default=0)
|
||||
parent_comment_id = Column(Integer, ForeignKey("comments.id"))
|
||||
|
||||
|
@ -81,8 +80,6 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
|||
if "created_utc" not in kwargs:
|
||||
kwargs["created_utc"] = int(time.time())
|
||||
|
||||
kwargs["creation_ip"] = request.remote_addr
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
@ -37,7 +37,6 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
uselist=False,
|
||||
innerjoin=True,
|
||||
primaryjoin="Submission.id==SubmissionAux.id")
|
||||
gm_distinguish = Column(Integer, default=0)
|
||||
author_id = Column(BigInteger, ForeignKey("users.id"))
|
||||
repost_id = Column(BigInteger, ForeignKey("submissions.id"), default=0)
|
||||
edited_utc = Column(BigInteger, default=0)
|
||||
|
@ -102,7 +101,6 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
"%I:%M %p on %d %b %Y", time.gmtime(
|
||||
kwargs["created_utc"]))
|
||||
|
||||
kwargs["creation_ip"] = request.remote_addr
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ class Vote(Base):
|
|||
vote_type = Column(Integer)
|
||||
submission_id = Column(Integer, ForeignKey("submissions.id"))
|
||||
created_utc = Column(Integer, default=0)
|
||||
creation_ip = Column(String)
|
||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||
|
||||
user = relationship("User", lazy="subquery")
|
||||
|
@ -25,7 +24,6 @@ class Vote(Base):
|
|||
if "created_utc" not in kwargs:
|
||||
kwargs["created_utc"] = int(time())
|
||||
|
||||
kwargs["creation_ip"]=request.remote_addr
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
@ -76,7 +74,6 @@ class CommentVote(Base):
|
|||
vote_type = Column(Integer)
|
||||
comment_id = Column(Integer, ForeignKey("comments.id"))
|
||||
created_utc = Column(Integer, default=0)
|
||||
creation_ip = Column(String)
|
||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||
|
||||
user = relationship("User", lazy="subquery")
|
||||
|
@ -86,7 +83,6 @@ class CommentVote(Base):
|
|||
if "created_utc" not in kwargs:
|
||||
kwargs["created_utc"] = int(time())
|
||||
|
||||
kwargs["creation_ip"]=request.remote_addr
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
|
|
|
@ -1163,33 +1163,6 @@ def multiple_plots(**kwargs):
|
|||
|
||||
return upload_from_file(name, name)
|
||||
|
||||
|
||||
@app.route("/admin/distinguish_post/<pid>", methods=["POST"])
|
||||
@app.route("/api/v1/distinguish_post/<pid>", methods=["POST"])
|
||||
@admin_level_required(6)
|
||||
@api("update")
|
||||
def distinguish_post(pid, v):
|
||||
|
||||
post = get_post(pid, v=v)
|
||||
|
||||
if post.author_id != v.id:
|
||||
abort(403)
|
||||
|
||||
if post.gm_distinguish:
|
||||
post.gm_distinguish = 0
|
||||
else:
|
||||
post.gm_distinguish = 1
|
||||
g.db.add(post)
|
||||
|
||||
ma=ModAction(
|
||||
kind="herald_post" if post.gm_distinguish else "unherald_post",
|
||||
user_id=v.id,
|
||||
target_submission_id=post.id,
|
||||
)
|
||||
g.db.add(ma)
|
||||
|
||||
return "", 204
|
||||
|
||||
@app.route("/admin/add_admin", methods=["POST"])
|
||||
@auth_required
|
||||
@validate_formkey
|
||||
|
|
|
@ -159,7 +159,6 @@ def api_vote_comment(comment_id, x, v):
|
|||
vote = CommentVote(user_id=v.id,
|
||||
vote_type=x,
|
||||
comment_id=base36decode(comment_id),
|
||||
creation_ip=request.remote_addr,
|
||||
app_id=v.client.application.id if v.client else None
|
||||
)
|
||||
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
<h2>Analysis</h2>
|
||||
|
||||
<p><b>{{u1.username}} Creation IP:</b> {{u1.creation_ip}}</p>
|
||||
<p><b>{{u2.username}} Creation IP:</b> {{u2.creation_ip}}</p>
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped mb-5">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue