change(fastapi): remove sqlite support

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-17 00:27:44 -08:00
parent 0abdf8d468
commit 07aac768d6
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 23 additions and 0 deletions

View file

@ -48,6 +48,12 @@ async def app_startup():
"TEST_RECURSION_LIMIT", sys.getrecursionlimit()))
sys.setrecursionlimit(recursion_limit)
backend = aurweb.config.get("database", "backend")
if backend not in aurweb.db.DRIVERS:
raise ValueError(
f"The configured database backend ({backend}) is unsupported. "
f"Supported backends: {str(aurweb.db.DRIVERS.keys())}")
session_secret = aurweb.config.get("fastapi", "session_secret")
if not session_secret:
raise Exception("[fastapi] session_secret must not be empty")