diff --git a/files/helpers/cron.py b/files/helpers/cron.py index a0fe5b4c68..a0456cfed8 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -185,7 +185,7 @@ def _create_and_delete_orgy(): del g.db stdout.flush() - requests.get(f'{SITE_FULL}/refresh_chat') + requests.post(f'{SITE_FULL}/refresh_chat') 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.get(f'{SITE_FULL}/refresh_chat') + requests.post(f'{SITE_FULL}/refresh_chat') def _delete_all_posts(): posts = g.db.query(Post).filter_by(author_id=AUTOJANNY_ID, deleted_utc=0).all() diff --git a/files/routes/admin.py b/files/routes/admin.py index 0d83182acf..42760f7538 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1979,7 +1979,7 @@ def start_orgy(v): g.db.add(orgy) g.db.commit() - requests.get(f'{SITE_FULL}/refresh_chat') + requests.post(f'{SITE_FULL}/refresh_chat') return redirect('/chat') @@ -1987,5 +1987,5 @@ def start_orgy(v): @admin_level_required(PERMS['ORGIES']) def stop_orgy(v): g.db.query(Orgy).delete() - requests.get(f'{SITE_FULL}/refresh_chat') + requests.post(f'{SITE_FULL}/refresh_chat') return {"message": "Orgy stopped successfully!"} diff --git a/files/routes/chat.py b/files/routes/chat.py index 2443906e04..93ddf18f6d 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -61,7 +61,7 @@ def is_not_banned_socketio(f): CHAT_ERROR_MESSAGE = f"To prevent spam, you'll need {TRUESCORE_CC_CHAT_MINIMUM} truescore (this is {TRUESCORE_CC_CHAT_MINIMUM} votes, either up or down, on any threads or comments you've made) in order to access chat. Sorry! I love you 💖" -@app.get('/refresh_chat') +@app.post('/refresh_chat') def refresh_chat(): emit('refresh_chat', namespace='/', to=f'{SITE_FULL}/chat') return ''