feat(user): wire audit recorder into login/logout

This commit is contained in:
2026-04-28 23:02:09 +08:00
parent f42b88e57d
commit 62cf9ffa0c
3 changed files with 86 additions and 18 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func TestHandler_LoginThenMeThenLogout(t *testing.T) {
DisplayName: "T",
PasswordHash: hash,
}
svc := NewService(repo)
svc := NewService(repo, nil)
srv := httptest.NewServer(mountHandler(svc))
defer srv.Close()
@@ -90,7 +90,7 @@ func TestHandler_LoginThenMeThenLogout(t *testing.T) {
// JSON object lacks both email and password and must be rejected with 400
// before the service layer is consulted.
func TestHandler_LoginInvalidPayload(t *testing.T) {
svc := NewService(newFakeRepo())
svc := NewService(newFakeRepo(), nil)
srv := httptest.NewServer(mountHandler(svc))
defer srv.Close()