Slots (#175)
* Initial commit. * Changes * Remove dead code * Remove dead code * Remove dead code Co-authored-by: Outrun Colors, LLC <outruncolors@gmail.com> Co-authored-by: Aevann1 <59999695+Aevann1@users.noreply.github.com>
This commit is contained in:
parent
0182aa6f3f
commit
2a4818177a
7 changed files with 164 additions and 4 deletions
|
@ -123,7 +123,6 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
else: template = "submission.html"
|
||||
return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True)
|
||||
|
||||
|
||||
@app.post("/comment")
|
||||
@limiter.limit("1/second;6/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
|
@ -561,6 +560,15 @@ def api_comment(v):
|
|||
|
||||
g.db.commit()
|
||||
|
||||
# Slots
|
||||
slots = Slots(g)
|
||||
slots_check = slots.check_for_slots_command(body, v, c)
|
||||
|
||||
if (slots_check['pulled'] == True):
|
||||
c.slots_result = slots_check['result']
|
||||
g.db.add(c)
|
||||
g.db.commit()
|
||||
|
||||
if request.headers.get("Authorization"): return c.json
|
||||
return render_template("comments.html", v=v, comments=[c])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue