some testing stuff
This commit is contained in:
parent
19dd5aaee7
commit
ce9ea61da5
1 changed files with 4 additions and 6 deletions
|
@ -13,8 +13,7 @@ import uvicorn
|
||||||
from fastapi import FastAPI
|
from fastapi import FastAPI
|
||||||
|
|
||||||
from .config import Config, Settings
|
from .config import Config, Settings
|
||||||
# from .db.schemata import User
|
from .db import Connection, User
|
||||||
from .db import Connection
|
|
||||||
from .routers import main_router
|
from .routers import main_router
|
||||||
|
|
||||||
settings = Settings.get()
|
settings = Settings.get()
|
||||||
|
@ -46,10 +45,9 @@ async def on_startup() -> None:
|
||||||
# connect to database
|
# connect to database
|
||||||
Connection.connect(current_config.db.uri)
|
Connection.connect(current_config.db.uri)
|
||||||
|
|
||||||
# # some testing
|
# some testing
|
||||||
# with Connection.use() as db:
|
print(User.get("admin"))
|
||||||
# print(User.from_db(db, "admin"))
|
print(User.get("nonexistent"))
|
||||||
# print(User.from_db(db, "nonexistent"))
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
Loading…
Reference in a new issue