File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ type AuditLogParams = {
1616function buildMarshalledAuditLogItem ( entry : AuditLogEntry ) {
1717 const baseNow = Date . now ( ) ;
1818 const timestamp = Math . floor ( baseNow / 1000 ) ;
19- const expireAt =
19+ const expiresAt =
2020 timestamp +
2121 Math . floor ( ( AUDIT_LOG_RETENTION_DAYS * 24 * 60 * 60 * 1000 ) / 1000 ) ;
2222
2323 return marshall (
2424 {
2525 ...entry ,
2626 createdAt : timestamp ,
27- expireAt ,
27+ expiresAt ,
2828 } ,
2929 { removeUndefinedValues : true } ,
3030 ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ resource "aws_dynamodb_table" "app_audit_log" {
1616 type = " N"
1717 }
1818 ttl {
19- attribute_name = " expireAt "
19+ attribute_name = " expiresAt "
2020 enabled = false
2121 }
2222}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ describe("Audit Log Transaction tests", () => {
5353 vi . spyOn ( Date , 'now' ) . mockReturnValue ( mockTimestamp ) ;
5454
5555 const timestamp = Math . floor ( mockTimestamp / 1000 ) ;
56- const expireAt = timestamp + Math . floor ( ( 365 * 24 * 60 * 60 * 1000 ) / 1000 ) ;
56+ const expiresAt = timestamp + Math . floor ( ( 365 * 24 * 60 * 60 * 1000 ) / 1000 ) ;
5757
5858 // Create test payload
5959 const payload = {
@@ -68,7 +68,7 @@ describe("Audit Log Transaction tests", () => {
6868 const expectedItem = marshall ( {
6969 ...payload ,
7070 createdAt : timestamp ,
71- expireAt : expireAt
71+ expiresAt : expiresAt
7272 } ) ;
7373
7474 // Call the function being tested
@@ -90,7 +90,7 @@ describe("Audit Log Transaction tests", () => {
9090 vi . spyOn ( Date , 'now' ) . mockReturnValue ( mockTimestamp ) ;
9191
9292 const timestamp = Math . floor ( mockTimestamp / 1000 ) ;
93- const expireAt = timestamp + Math . floor ( ( 365 * 24 * 60 * 60 * 1000 ) / 1000 ) ;
93+ const expiresAt = timestamp + Math . floor ( ( 365 * 24 * 60 * 60 * 1000 ) / 1000 ) ;
9494
9595 // Create test payload with only required fields
9696 const payload = {
@@ -103,7 +103,7 @@ describe("Audit Log Transaction tests", () => {
103103 const expectedItem = marshall ( {
104104 ...payload ,
105105 createdAt : timestamp ,
106- expireAt : expireAt
106+ expiresAt : expiresAt
107107 } ) ;
108108
109109 // Call the function being tested
You can’t perform that action at this time.
0 commit comments