add last login
This commit is contained in:
@@ -44,6 +44,14 @@ def authentication(
|
||||
if not pbkdf2_sha256.verify(password, password_hash):
|
||||
raise InvalidCredentialsError('Invalid credentials')
|
||||
|
||||
dyn.update_item(
|
||||
key=KeyPair(user_id, '0'),
|
||||
# Post-migration (users): uncomment the following line
|
||||
# update_expr='SET last_login = :now',
|
||||
update_expr='SET lastLogin = :now',
|
||||
expr_attr_values={':now': now()},
|
||||
)
|
||||
|
||||
return Response(
|
||||
status_code=HTTPStatus.OK,
|
||||
cookies=[
|
||||
|
||||
Reference in New Issue
Block a user