aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-23 09:50:57 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:21 +0200
commit3acc50844047a37698f0618fa235c138e386a053 (patch)
treee33243bf7fadbcf2df616fc41814245094fd881a /server/models/video/video-channel.ts
parent1735c825726edaa0af5035cb6cbb0cc0db502c6d (diff)
downloadPeerTube-3acc50844047a37698f0618fa235c138e386a053.tar.gz
PeerTube-3acc50844047a37698f0618fa235c138e386a053.tar.zst
PeerTube-3acc50844047a37698f0618fa235c138e386a053.zip
Upgrade sequelize
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 901006dea..fb70e6625 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -58,15 +58,15 @@ type AvailableForListOptions = {
58 actorId: number 58 actorId: number
59} 59}
60 60
61@DefaultScope({ 61@DefaultScope(() => ({
62 include: [ 62 include: [
63 { 63 {
64 model: () => ActorModel, 64 model: ActorModel,
65 required: true 65 required: true
66 } 66 }
67 ] 67 ]
68}) 68}))
69@Scopes({ 69@Scopes(() => ({
70 [ScopeNames.SUMMARY]: (withAccount = false) => { 70 [ScopeNames.SUMMARY]: (withAccount = false) => {
71 const base: FindOptions = { 71 const base: FindOptions = {
72 attributes: [ 'name', 'description', 'id', 'actorId' ], 72 attributes: [ 'name', 'description', 'id', 'actorId' ],
@@ -142,22 +142,22 @@ type AvailableForListOptions = {
142 [ScopeNames.WITH_ACCOUNT]: { 142 [ScopeNames.WITH_ACCOUNT]: {
143 include: [ 143 include: [
144 { 144 {
145 model: () => AccountModel, 145 model: AccountModel,
146 required: true 146 required: true
147 } 147 }
148 ] 148 ]
149 }, 149 },
150 [ScopeNames.WITH_VIDEOS]: { 150 [ScopeNames.WITH_VIDEOS]: {
151 include: [ 151 include: [
152 () => VideoModel 152 VideoModel
153 ] 153 ]
154 }, 154 },
155 [ScopeNames.WITH_ACTOR]: { 155 [ScopeNames.WITH_ACTOR]: {
156 include: [ 156 include: [
157 () => ActorModel 157 ActorModel
158 ] 158 ]
159 } 159 }
160}) 160}))
161@Table({ 161@Table({
162 tableName: 'videoChannel', 162 tableName: 'videoChannel',
163 indexes 163 indexes