Skip to content

Commit

Permalink
api - add synced user and date fields to submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Sep 28, 2024
1 parent 47aa07f commit b2de057
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TASVideos.Api/Extensions/EntityExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ public static IQueryable<SubmissionsResponse> ToSubmissionsResponse(this IQuerya
.OrderBy(a => a.Ordinal)
.Select(a => a.Author!.UserName),
AdditionalAuthors = s.AdditionalAuthors,
CreateTimestamp = s.CreateTimestamp
CreateTimestamp = s.CreateTimestamp,
SyncedOn = s.SyncedOn,
SyncedByUser = s.SyncedByUser != null
? s.SyncedByUser.UserName
: null
});
}
}
6 changes: 6 additions & 0 deletions TASVideos.Api/Responses/SubmissionsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,10 @@ internal class SubmissionsResponse

[Sortable]
public DateTime CreateTimestamp { get; init; }

[Sortable]
public DateTime? SyncedOn { get; init; }

[Sortable]
public string? SyncedByUser { get; init; }
}

0 comments on commit b2de057

Please sign in to comment.