Skip to content

Commit

Permalink
chore: Store created timestamp on members
Browse files Browse the repository at this point in the history
  • Loading branch information
smessie committed Oct 17, 2024
1 parent 05cedcc commit 420244f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/repositories/MongoDBRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export class MongoDBRepository implements Repository {
update: {
$setOnInsert: {
data: data,
created: Date.now(),
},
},
upsert: true,
Expand Down
4 changes: 4 additions & 0 deletions src/repositories/RedisRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export class RedisRepository implements Repository {
`${this.data}:${encodeURIComponent(record.payload)}`,
data,
),
this.client.set(
`${this.data}:${encodeURIComponent(record.payload)}:created`,
Date.now(),
),
);
}

Expand Down

0 comments on commit 420244f

Please sign in to comment.