Added comments

This commit is contained in:
StNicolay
2022-10-14 15:41:55 +03:00
parent 3ebe4240bf
commit 29b7125a4d
3 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ def add_account(
enc_login: bytes,
enc_pass: bytes,
) -> bool:
"""Adds account to db. Returns true, if on success"""
account = models.Account(
user_id=user_id, name=name, salt=salt, enc_login=enc_login, enc_pass=enc_pass
)
@ -27,6 +28,7 @@ def add_account(
def add_master_pass(engine: Engine, user_id: int, salt: bytes, passwd: bytes) -> bool:
"""Adds master password to db. Returns true, if on success"""
master_pass = models.MasterPass(user_id=user_id, salt=salt, passwd=passwd)
try:
with sqlmodel.Session(engine) as session: