fix /refresh_chat once and for all

master
Aevann 2023-09-26 23:59:56 +03:00
parent 89df128827
commit fb0b92364a
2 changed files with 4 additions and 5 deletions

View File

@ -185,7 +185,7 @@ def _create_and_delete_orgy():
del g.db
stdout.flush()
requests.post('http://localhost:5001/refresh_chat')
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
video_info = ffmpeg.probe(f'/orgies/{get_file()}')
seconds = int(video_info['streams'][0]['duration'])
@ -195,7 +195,7 @@ def _create_and_delete_orgy():
if orgy:
g.db.delete(orgy)
g.db.commit()
requests.post('http://localhost:5001/refresh_chat')
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
def _delete_all_posts():
posts = g.db.query(Post).filter_by(author_id=AUTOJANNY_ID, deleted_utc=0).all()

View File

@ -1979,8 +1979,7 @@ def start_orgy(v):
g.db.add(orgy)
g.db.commit()
x = requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
print(x.text, flush=True)
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
return redirect('/chat')
@ -1988,5 +1987,5 @@ def start_orgy(v):
@admin_level_required(PERMS['ORGIES'])
def stop_orgy(v):
g.db.query(Orgy).delete()
requests.post('http://localhost:5001/refresh_chat')
requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE})
return {"message": "Orgy stopped successfully!"}