From ce9ea61da54073a71717b710c27b09596669f325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Mon, 28 Mar 2022 02:02:12 +0000 Subject: [PATCH] some testing stuff --- api/kiwi_vpn_api/main.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api/kiwi_vpn_api/main.py b/api/kiwi_vpn_api/main.py index 71870fb..4503d1a 100755 --- a/api/kiwi_vpn_api/main.py +++ b/api/kiwi_vpn_api/main.py @@ -13,8 +13,7 @@ import uvicorn from fastapi import FastAPI from .config import Config, Settings -# from .db.schemata import User -from .db import Connection +from .db import Connection, User from .routers import main_router settings = Settings.get() @@ -46,10 +45,9 @@ async def on_startup() -> None: # connect to database Connection.connect(current_config.db.uri) - # # some testing - # with Connection.use() as db: - # print(User.from_db(db, "admin")) - # print(User.from_db(db, "nonexistent")) + # some testing + print(User.get("admin")) + print(User.get("nonexistent")) def main() -> None: