feat: added endpoints: auth, pofile, account, keyring

This commit is contained in:
TheNoxium
2025-04-17 15:36:52 +05:00
parent b2f65ba21f
commit 1333992dc5
27 changed files with 1297 additions and 160 deletions

View File

@@ -5,6 +5,7 @@ import secrets
from api.db.connection.session import get_connection
from api.db.tables.account import account_table, account_keyring_table, AccountRole, KeyType, KeyStatus
from api.utils.key_id_gen import KeyIdGenerator
INIT_LOCK_FILE = "../init.lock"
DEFAULT_LOGIN = "vorkout"
@@ -39,6 +40,7 @@ async def init():
create_key_query = account_keyring_table.insert().values(
owner_id=user_id,
key_type=KeyType.PASSWORD,
key_id=KeyIdGenerator()
key_value=hashed_password,
status=KeyStatus.ACTIVE,
)