From 47f3086776ec11d71ae8073ef983b8d7d8f059d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Wed, 3 Dec 2025 01:55:45 -0300 Subject: [PATCH] add last login --- id.saladeaula.digital/app/routes/authentication.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/id.saladeaula.digital/app/routes/authentication.py b/id.saladeaula.digital/app/routes/authentication.py index 04a6962..f142744 100644 --- a/id.saladeaula.digital/app/routes/authentication.py +++ b/id.saladeaula.digital/app/routes/authentication.py @@ -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=[