diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-10 16:40:56 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-10 16:40:56 +0100 |
commit | ac75f640fefb4412a9982b904c043e93fd606966 (patch) | |
tree | 342c07a010a824fd7c5fa76eacee075fdbe14ce4 /server/models/user/user-video-history.ts | |
parent | 3318147300b4f998adf728eb0a5a14a4c1829c51 (diff) | |
download | PeerTube-ac75f640fefb4412a9982b904c043e93fd606966.tar.gz PeerTube-ac75f640fefb4412a9982b904c043e93fd606966.tar.zst PeerTube-ac75f640fefb4412a9982b904c043e93fd606966.zip |
Display all user history
Not limited to instance federation bubble
Diffstat (limited to 'server/models/user/user-video-history.ts')
-rw-r--r-- | server/models/user/user-video-history.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/server/models/user/user-video-history.ts b/server/models/user/user-video-history.ts index 6d9f2e03f..8aff7b10c 100644 --- a/server/models/user/user-video-history.ts +++ b/server/models/user/user-video-history.ts | |||
@@ -57,19 +57,14 @@ export class UserVideoHistoryModel extends Model<Partial<AttributesOnly<UserVide | |||
57 | }) | 57 | }) |
58 | User: UserModel | 58 | User: UserModel |
59 | 59 | ||
60 | static async listForApi (user: MUserAccountId, start: number, count: number, search?: string) { | 60 | static listForApi (user: MUserAccountId, start: number, count: number, search?: string) { |
61 | const serverActor = await getServerActor() | ||
62 | |||
63 | return VideoModel.listForApi({ | 61 | return VideoModel.listForApi({ |
64 | start, | 62 | start, |
65 | count, | 63 | count, |
66 | search, | 64 | search, |
67 | sort: '-"userVideoHistory"."updatedAt"', | 65 | sort: '-"userVideoHistory"."updatedAt"', |
68 | nsfw: null, // All | 66 | nsfw: null, // All |
69 | displayOnlyForFollower: { | 67 | displayOnlyForFollower: null, |
70 | actorId: serverActor.id, | ||
71 | orLocalVideos: true | ||
72 | }, | ||
73 | user, | 68 | user, |
74 | historyOfUser: user | 69 | historyOfUser: user |
75 | }) | 70 | }) |