eighth commit
This commit is contained in:
@@ -21,6 +21,10 @@ if not os.path.exists(HISTORY_FILE):
|
|||||||
with open(HISTORY_FILE, "w") as f:
|
with open(HISTORY_FILE, "w") as f:
|
||||||
json.dump([], f)
|
json.dump([], f)
|
||||||
|
|
||||||
|
def write_log(message):
|
||||||
|
with open(LOG_FILE, "a") as f:
|
||||||
|
f.write(f"{datetime.now().strftime('%H:%M:%S')} - {message}\n")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/", response_class=HTMLResponse)
|
||||||
async def home(request: Request):
|
async def home(request: Request):
|
||||||
|
|||||||
Reference in New Issue
Block a user