Skip to content

Commit b2de057

Browse files
committed
api - add synced user and date fields to submissions
1 parent 47aa07f commit b2de057

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

TASVideos.Api/Extensions/EntityExtensions.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ public static IQueryable<SubmissionsResponse> ToSubmissionsResponse(this IQuerya
112112
.OrderBy(a => a.Ordinal)
113113
.Select(a => a.Author!.UserName),
114114
AdditionalAuthors = s.AdditionalAuthors,
115-
CreateTimestamp = s.CreateTimestamp
115+
CreateTimestamp = s.CreateTimestamp,
116+
SyncedOn = s.SyncedOn,
117+
SyncedByUser = s.SyncedByUser != null
118+
? s.SyncedByUser.UserName
119+
: null
116120
});
117121
}
118122
}

TASVideos.Api/Responses/SubmissionsResponse.cs

+6
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,10 @@ internal class SubmissionsResponse
7373

7474
[Sortable]
7575
public DateTime CreateTimestamp { get; init; }
76+
77+
[Sortable]
78+
public DateTime? SyncedOn { get; init; }
79+
80+
[Sortable]
81+
public string? SyncedByUser { get; init; }
7682
}

0 commit comments

Comments
 (0)