summaryrefslogtreecommitdiff
path: root/apirouters/agents.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-08-25 21:20:49 +0200
committerBotond Hende <nettingman@gmail.com>2024-08-25 21:20:49 +0200
commitd41aa536f647726f3d58eb24ae16d5c75d278e0c (patch)
treeb44bd5ba138969646977e819d2908fdcf15d8979 /apirouters/agents.py
parenta0e04e28bbab7ecc6a0c3b1bee72da303b82aebd (diff)
renamed variables
Diffstat (limited to 'apirouters/agents.py')
-rw-r--r--apirouters/agents.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/apirouters/agents.py b/apirouters/agents.py
index 3d148d2..b8c0b95 100644
--- a/apirouters/agents.py
+++ b/apirouters/agents.py
@@ -5,7 +5,7 @@ from fastapi import APIRouter, Depends, Response
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from passlib.context import CryptContext
-from modules.database import cursor, sq_con
+from modules.database import cursor, conn
router = APIRouter()
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
@@ -49,5 +49,5 @@ async def init_agent(callsign: str, token: Annotated[str, Depends(oauth2_scheme)
token_hash = pwd_context.hash(token)
cursor.execute("INSERT INTO agents (callsign, token_hash) VALUES (?, ?)", (callsign, token_hash))
- sq_con.commit()
+ conn.commit()
return '{"result": "Agent successfully registered."}'