Remove backward compatibility (peertubeHelpers.user.getAuthUser always available).

This commit is contained in:
John Livingston
2021-06-02 14:07:12 +02:00
parent 6f57931a9d
commit 228a60ca3a
3 changed files with 5 additions and 23 deletions

View File

@ -127,14 +127,12 @@ interface PeerTubeHelpers {
}
videos: {
loadByUrl: (url: string) => Promise<MVideoThumbnail>
// NB: loadByIdOrUUID was introduced in v3.1.0
loadByIdOrUUID: (id: number | string) => Promise<MVideoThumbnail>
removeVideo: (videoId: number) => Promise<void>
}
config: {
getWebserverUrl: () => string
// getServerConfig comes with Peertube 3.2.0
getServerConfig?: () => Promise<ServerConfig>
getServerConfig: () => Promise<ServerConfig>
}
moderation: {
blockServer: (options: { byAccountId: number, hostToBlock: string }) => Promise<void>
@ -149,8 +147,7 @@ interface PeerTubeHelpers {
server: {
getServerActor: () => Promise<ActorModel>
}
// Added in Peertube 3.2.0
user?: {
user: {
getAuthUser: (res: express.Response) => Promise<MUserDefault | undefined>
}
// Added in Peertube 3.2.0