add link to catalog
This commit is contained in:
@@ -39,7 +39,7 @@ def authentication(
|
||||
else:
|
||||
if not pbkdf2_sha256.verify(password, password_hash):
|
||||
dyn.update_item(
|
||||
key=KeyPair(user_id, 'FAILED_ATTEMPTS'),
|
||||
key=KeyPair(user_id, 'LOGIN#FAILED_ATTEMPTS'),
|
||||
update_expr='SET #count = if_not_exists(#count, :zero) + :one, \
|
||||
updated_at = :now',
|
||||
expr_attr_names={
|
||||
@@ -153,12 +153,12 @@ def new_session(user_id: str) -> str:
|
||||
|
||||
with dyn.transact_writer() as transact:
|
||||
transact.delete(
|
||||
key=KeyPair(user_id, 'FAILED_ATTEMPTS'),
|
||||
key=KeyPair(user_id, 'LOGIN#FAILED_ATTEMPTS'),
|
||||
)
|
||||
transact.update(
|
||||
key=KeyPair(user_id, '0'),
|
||||
# Post-migration (users): uncomment the following line
|
||||
# update_expr='SET last_login = :now',
|
||||
# update_expr='SET last_login_at = :now',
|
||||
update_expr='SET lastLogin = :now',
|
||||
expr_attr_values={
|
||||
':now': now_,
|
||||
|
||||
Reference in New Issue
Block a user