Scalino84 commited on
Commit
a361035
·
verified ·
1 Parent(s): 9bd1aa2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -266,16 +266,16 @@ def read_archive(
266
  "username": username,
267
  })
268
 
269
- # Öffentliche Route
270
- @app.get("/")
271
- def read_root(request: Request):
272
- with get_db_connection() as conn:
273
- cursor = conn.cursor()
274
- cursor.execute("SELECT id, name FROM albums")
275
- albums = cursor.fetchall()
276
- cursor.execute("SELECT id, name FROM categories")
277
- categories = cursor.fetchall()
278
- return templates.TemplateResponse("index.html", {"request": request, "albums": albums, "categories": categories})
279
 
280
  @app.get("/backend")
281
  def read_backend(request: Request):
@@ -725,4 +725,4 @@ if __name__ == "__main__":
725
  port=7860,
726
  reload=True,
727
  log_level="trace"
728
- )
 
266
  "username": username,
267
  })
268
 
269
+ # Öffentliche Route
270
+ @app.get("/")
271
+ def read_root(request: Request):
272
+ with get_db_connection() as conn:
273
+ cursor = conn.cursor()
274
+ cursor.execute("SELECT id, name FROM albums")
275
+ albums = cursor.fetchall()
276
+ cursor.execute("SELECT id, name FROM categories")
277
+ categories = cursor.fetchall()
278
+ return templates.TemplateResponse("index.html", {"request": request, "albums": albums, "categories": categories})
279
 
280
  @app.get("/backend")
281
  def read_backend(request: Request):
 
725
  port=7860,
726
  reload=True,
727
  log_level="trace"
728
+ )