]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-channel.ts
Cleanup models
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel.ts
index 93566a5c642b112bf62a1fed0d7f0de331b0b82e..64130310d4db7ed47844812820f5072cc1d4b8b7 100644 (file)
@@ -12,7 +12,6 @@ let toFormattedJSON: VideoChannelMethods.ToFormattedJSON
 let toActivityPubObject: VideoChannelMethods.ToActivityPubObject
 let isOwned: VideoChannelMethods.IsOwned
 let countByAccount: VideoChannelMethods.CountByAccount
-let listOwned: VideoChannelMethods.ListOwned
 let listForApi: VideoChannelMethods.ListForApi
 let listByAccount: VideoChannelMethods.ListByAccount
 let loadByIdAndAccount: VideoChannelMethods.LoadByIdAndAccount
@@ -88,7 +87,6 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da
 
     listForApi,
     listByAccount,
-    listOwned,
     loadByIdAndAccount,
     loadAndPopulateAccount,
     loadByUUIDAndPopulateAccount,
@@ -192,17 +190,6 @@ countByAccount = function (accountId: number) {
   return VideoChannel.count(query)
 }
 
-listOwned = function () {
-  const query = {
-    where: {
-      remote: false
-    },
-    include: [ VideoChannel['sequelize'].models.Account ]
-  }
-
-  return VideoChannel.findAll(query)
-}
-
 listForApi = function (start: number, count: number, sort: string) {
   const query = {
     offset: start,