From 80bfd33c0bf910e2cfdd3270b14ba9eddd90e2e8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Dec 2018 09:31:09 +0100 Subject: Add history page on client --- server/models/video/video.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/models/video/video.ts') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 199ea9ea4..3f282580c 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -425,6 +425,11 @@ type AvailableForListIDsOptions = { userId: options.historyOfUser.id } }) + + // Even if the relation is n:m, we know that a user only have 0..1 video history + // So we won't have multiple rows for the same video + // Without this, we would not be able to sort on "updatedAt" column of UserVideoHistoryModel + query.subQuery = false } return query -- cgit v1.2.3