aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-23 17:36:15 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commit39445ead45aaaea801ec09991b8dd2464f722e47 (patch)
tree9306c6b89115dabdd4a7c31a59784134a0e1c804 /server/models/video/video-channel-interface.ts
parent16b90975941b78d01d7202d441bf731a10048c16 (diff)
downloadPeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.tar.gz
PeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.tar.zst
PeerTube-39445ead45aaaea801ec09991b8dd2464f722e47.zip
Cleanup models
Diffstat (limited to 'server/models/video/video-channel-interface.ts')
-rw-r--r--server/models/video/video-channel-interface.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/server/models/video/video-channel-interface.ts b/server/models/video/video-channel-interface.ts
index 8ad3e5cb7..b409d1db3 100644
--- a/server/models/video/video-channel-interface.ts
+++ b/server/models/video/video-channel-interface.ts
@@ -1,13 +1,11 @@
1import * as Sequelize from 'sequelize'
2import * as Promise from 'bluebird' 1import * as Promise from 'bluebird'
2import * as Sequelize from 'sequelize'
3 3
4import { ResultList } from '../../../shared' 4import { ResultList } from '../../../shared'
5 5import { VideoChannelObject } from '../../../shared/models/activitypub/objects/video-channel-object'
6// Don't use barrel, import just what we need
7import { VideoChannel as FormattedVideoChannel } from '../../../shared/models/videos/video-channel.model' 6import { VideoChannel as FormattedVideoChannel } from '../../../shared/models/videos/video-channel.model'
8import { VideoInstance } from './video-interface'
9import { AccountInstance } from '../account/account-interface' 7import { AccountInstance } from '../account/account-interface'
10import { VideoChannelObject } from '../../../shared/models/activitypub/objects/video-channel-object' 8import { VideoInstance } from './video-interface'
11 9
12export namespace VideoChannelMethods { 10export namespace VideoChannelMethods {
13 export type ToFormattedJSON = (this: VideoChannelInstance) => FormattedVideoChannel 11 export type ToFormattedJSON = (this: VideoChannelInstance) => FormattedVideoChannel
@@ -15,7 +13,6 @@ export namespace VideoChannelMethods {
15 export type IsOwned = (this: VideoChannelInstance) => boolean 13 export type IsOwned = (this: VideoChannelInstance) => boolean
16 14
17 export type CountByAccount = (accountId: number) => Promise<number> 15 export type CountByAccount = (accountId: number) => Promise<number>
18 export type ListOwned = () => Promise<VideoChannelInstance[]>
19 export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoChannelInstance> > 16 export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList<VideoChannelInstance> >
20 export type LoadByIdAndAccount = (id: number, accountId: number) => Promise<VideoChannelInstance> 17 export type LoadByIdAndAccount = (id: number, accountId: number) => Promise<VideoChannelInstance>
21 export type ListByAccount = (accountId: number) => Promise< ResultList<VideoChannelInstance> > 18 export type ListByAccount = (accountId: number) => Promise< ResultList<VideoChannelInstance> >
@@ -32,10 +29,7 @@ export interface VideoChannelClass {
32 countByAccount: VideoChannelMethods.CountByAccount 29 countByAccount: VideoChannelMethods.CountByAccount
33 listForApi: VideoChannelMethods.ListForApi 30 listForApi: VideoChannelMethods.ListForApi
34 listByAccount: VideoChannelMethods.ListByAccount 31 listByAccount: VideoChannelMethods.ListByAccount
35 listOwned: VideoChannelMethods.ListOwned
36 loadByIdAndAccount: VideoChannelMethods.LoadByIdAndAccount 32 loadByIdAndAccount: VideoChannelMethods.LoadByIdAndAccount
37 loadByUUID: VideoChannelMethods.LoadByUUID
38 loadByHostAndUUID: VideoChannelMethods.LoadByHostAndUUID
39 loadAndPopulateAccount: VideoChannelMethods.LoadAndPopulateAccount 33 loadAndPopulateAccount: VideoChannelMethods.LoadAndPopulateAccount
40 loadByUUIDAndPopulateAccount: VideoChannelMethods.LoadByUUIDAndPopulateAccount 34 loadByUUIDAndPopulateAccount: VideoChannelMethods.LoadByUUIDAndPopulateAccount
41 loadAndPopulateAccountAndVideos: VideoChannelMethods.LoadAndPopulateAccountAndVideos 35 loadAndPopulateAccountAndVideos: VideoChannelMethods.LoadAndPopulateAccountAndVideos