Skip to content

Commit

Permalink
chore: Consolidate SeenLog naming, change CreatedAt to SeenAt (#637)
Browse files Browse the repository at this point in the history
Forgot to change these on @arealmaas suggestion on the SeenLog endpoint
PR
  • Loading branch information
oskogstad authored Apr 16, 2024
1 parent 9b84483 commit bde5845
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/swagger/V1/swagger.verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -3940,7 +3940,7 @@
"type": "string",
"format": "guid"
},
"createdAt": {
"seenAt": {
"type": "string",
"format": "date-time"
},
Expand Down Expand Up @@ -4305,7 +4305,7 @@
"type": "string",
"format": "guid"
},
"createdAt": {
"seenAt": {
"type": "string",
"format": "date-time"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed class GetDialogDto
public class GetDialogDialogSeenLogDto
{
public Guid Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset SeenAt { get; set; }

public string EndUserIdHash { get; set; } = null!;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public MappingProfile()
.ForMember(dest => dest.Status, opt => opt.MapFrom(src => src.StatusId))
.ForMember(dest => dest.SeenSinceLastUpdate, opt => opt.Ignore());

CreateMap<Domain.Dialogs.Entities.DialogSeenLog, GetDialogDialogSeenLogDto>();
CreateMap<DialogSeenLog, GetDialogDialogSeenLogDto>()
.ForMember(dest => dest.SeenAt, opt => opt.MapFrom(src => src.CreatedAt));

CreateMap<DialogActivity, GetDialogDialogActivityDto>()
.ForMember(dest => dest.Type, opt => opt.MapFrom(src => src.TypeId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public MappingProfile()
.ForMember(dest => dest.Type, opt => opt.MapFrom(src => src.TypeId));

CreateMap<DialogSeenLog, SearchDialogDialogSeenLogDto>()
.ForMember(dest => dest.SeenAt, opt => opt.MapFrom(src => src.CreatedAt))
.ForMember(dest => dest.EndUserIdHash, opt => opt.MapFrom(src => src.EndUserId));

CreateMap<DialogActivity, SearchDialogDialogActivityDto>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed class SearchDialogDto
public class SearchDialogDialogSeenLogDto
{
public Guid Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset SeenAt { get; set; }

public string EndUserIdHash { get; set; } = null!;

Expand Down

0 comments on commit bde5845

Please sign in to comment.