mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-08 02:09:06 -06:00
hidden tweaks
This commit is contained in:
@@ -44,8 +44,7 @@ def user_info():
|
|||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
if current_user.is_authenticated:
|
if current_user.is_authenticated:
|
||||||
print(current_user)
|
content = [{'text': fake.paragraph(nb_sentences=15),
|
||||||
content = [{'text': fake.paragraph(nb_sentences=15),
|
|
||||||
'seed': random.randint(0, 1000),
|
'seed': random.randint(0, 1000),
|
||||||
'title': fake.word().title()}
|
'title': fake.word().title()}
|
||||||
for _ in range(10)]
|
for _ in range(10)]
|
||||||
@@ -127,7 +126,7 @@ def hidden_help(id):
|
|||||||
|
|
||||||
@app.route('/hidden<id>/')
|
@app.route('/hidden<id>/')
|
||||||
@login_required
|
@login_required
|
||||||
# @require_role(roles=['Hidden'])
|
@require_role(roles=['Hidden'])
|
||||||
def hidden(id):
|
def hidden(id):
|
||||||
if not validate_id(id):
|
if not validate_id(id):
|
||||||
return '<span style="color: red;">error:</span> bad id'
|
return '<span style="color: red;">error:</span> bad id'
|
||||||
@@ -154,7 +153,6 @@ def hidden(id):
|
|||||||
count = min(25, count)
|
count = min(25, count)
|
||||||
else:
|
else:
|
||||||
count = min(50, count)
|
count = min(50, count)
|
||||||
# print(type(jsonify(request.args.to_dict())))
|
|
||||||
search = Search(user_id=current_user.id, exact_url=str(request.url), query_args=json.dumps(request.args.to_dict()))
|
search = Search(user_id=current_user.id, exact_url=str(request.url), query_args=json.dumps(request.args.to_dict()))
|
||||||
db.session.add(search)
|
db.session.add(search)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user