cycles/reload.py

15 lines
333 B
Python
Raw Permalink Normal View History

2022-04-15 02:47:27 +00:00
import os
from flask import request, Flask
app = Flask(__name__)
@app.route('/reload')
def reload():
if request.args.get('password') == 'BananaHammocks':
try:
os.system('git pull origin master')
return 'success'
except:
return 'fail'
else:
return 'wrong password'