Skip to content

Commit 2ce17ff

Browse files
authored
Merge branch 'main' into tbramwell/LFXV2-1735-otel-sdk-bootstrap
2 parents 1dc95a1 + 098a2a2 commit 2ce17ff

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

cmd/voting-api/eventing/vote_response_event_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ func convertMapToVoteResponseData(
152152
PollID: voteDB.PollID,
153153
ProjectID: voteDB.ProjectID,
154154
VoteCreationTime: voteDB.VoteCreationTime,
155+
LastModifiedTime: voteDB.LastModifiedTime,
155156
UserID: voteDB.UserID,
156157
UserEmail: voteDB.UserEmail,
157158
UserRole: voteDB.UserRole,

cmd/voting-api/eventing/vote_response_event_handler_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func TestConvertMapToVoteResponseData(t *testing.T) {
2424
"poll_id": "poll-456",
2525
"project_id": "project-sfid",
2626
"vote_creation_time": "2024-01-01T00:00:00Z",
27+
"last_modified_time": "2024-06-01T12:00:00Z",
2728
"user_id": "user-123",
2829
"user_email": "test@example.com",
2930
"user_role": "voter",
@@ -59,6 +60,7 @@ func TestConvertMapToVoteResponseData(t *testing.T) {
5960
assert.Equal(t, "testuser", result.Username)
6061
assert.Equal(t, "submitted", result.VoteStatus)
6162
assert.False(t, result.Abstained)
63+
assert.Equal(t, "2024-06-01T12:00:00Z", result.LastModifiedTime)
6264
})
6365

6466
t.Run("converts ranked choice answers from string to int", func(t *testing.T) {

internal/domain/event_models.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ type VoteDBRaw struct {
157157
PollID string `json:"poll_id"`
158158
ProjectID string `json:"project_id"`
159159
VoteCreationTime string `json:"vote_creation_time"`
160+
LastModifiedTime string `json:"last_modified_time"`
160161
UserID string `json:"user_id"`
161162
UserEmail string `json:"user_email"`
162163
UserRole string `json:"user_role"`
@@ -282,6 +283,7 @@ type VoteResponseData struct {
282283
ProjectID string `json:"project_id"` // v1 project ID (SFID)
283284
ProjectUID string `json:"project_uid"` // v2 project UID
284285
VoteCreationTime string `json:"vote_creation_time"`
286+
LastModifiedTime string `json:"last_modified_time"`
285287
UserID string `json:"user_id"`
286288
UserEmail string `json:"user_email"`
287289
UserRole string `json:"user_role"`

0 commit comments

Comments
 (0)