1
0
Fork 0
forked from swee/MeowNex

fix paths

This commit is contained in:
Swee 2024-10-02 21:56:40 -07:00
parent 209c87c29f
commit 0adfe7fcb9
2 changed files with 6 additions and 4 deletions

View file

@ -3,6 +3,7 @@ from flask import send_file
from flask import request
from flask import redirect
import os
from pathlib import Path
from time import sleep as wait
app = Flask(__name__)
@ -12,11 +13,11 @@ def index():
@app.route('/run.txt')
def run():
wait(2)
return send_file("run.txt", mimetype='text/html')
return send_file(str(Path.home()) + "/run.txt", mimetype='text/html')
@app.route('/block.txt')
def block():
wait(2)
return send_file("block.txt", mimetype='text/html')
return send_file(str(Path.home()) + "/block.txt", mimetype='text/html')
@app.route('/script.js')
def script():
return send_file("script.js", mimetype='application/javascript')

View file

@ -9,6 +9,7 @@ import re
from random import choice, randint as random
import traceback
import threading
from pathlib import Path
class config:
def __init__(self):
self.conn = sqlite3.connect(environ["SBconfig"])
@ -147,8 +148,8 @@ block = 0
global times
times = 0
def update():
open("/home/swee/run.txt", 'w').write(str(run))
open("/home/swee/block.txt", 'w').write(str(block))
open(str(Path.home()) + "/run.txt", 'w').write(str(run))
open(str(Path.home()) + "/block.txt", 'w').write(str(block))
update()
def irci2():