From 88582d9ff3ead75198c76bb46f7ea6fcf8cc7278 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 19 May 2023 19:30:30 +0700 Subject: [PATCH] Bad ChatGPT --- api.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api.py b/api.py index 957e8d9..c4d6a95 100644 --- a/api.py +++ b/api.py @@ -19,11 +19,6 @@ app.mount("/static", StaticFiles(directory="static", html=True), name="static") couch = couchdb.Server(f"http://{COUCHDB_USER}:{COUCHDB_PASSWORD}@{COUCHDB_HOST}:{COUCHDB_PORT}") -@app.on_event("startup") -async def startup_event(): - if 'urls' not in couch: - couch.create_database('urls') - @app.get("/") async def root(): return FileResponse('static/index.html')