diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-14 17:38:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:53:16 +0100 |
commit | 50d6de9c286abcb34ff4234d56d9cbb803db7665 (patch) | |
tree | f1732b27edcd05c7877a8358b8312f1e38c287ed /server/models/video/video-abuse.ts | |
parent | fadf619ad61a016c1c7fc53de5a8f398a4f77519 (diff) | |
download | PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.gz PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.zst PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.zip |
Begin moving video channel to actor
Diffstat (limited to 'server/models/video/video-abuse.ts')
-rw-r--r-- | server/models/video/video-abuse.ts | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index d0ee969fb..182971c4e 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts | |||
@@ -3,7 +3,6 @@ import { VideoAbuseObject } from '../../../shared/models/activitypub/objects' | |||
3 | import { isVideoAbuseReasonValid } from '../../helpers/custom-validators/videos' | 3 | import { isVideoAbuseReasonValid } from '../../helpers/custom-validators/videos' |
4 | import { CONFIG } from '../../initializers' | 4 | import { CONFIG } from '../../initializers' |
5 | import { AccountModel } from '../account/account' | 5 | import { AccountModel } from '../account/account' |
6 | import { ServerModel } from '../server/server' | ||
7 | import { getSort, throwIfNotValid } from '../utils' | 6 | import { getSort, throwIfNotValid } from '../utils' |
8 | import { VideoModel } from './video' | 7 | import { VideoModel } from './video' |
9 | 8 | ||
@@ -63,13 +62,7 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
63 | include: [ | 62 | include: [ |
64 | { | 63 | { |
65 | model: AccountModel, | 64 | model: AccountModel, |
66 | required: true, | 65 | required: true |
67 | include: [ | ||
68 | { | ||
69 | model: ServerModel, | ||
70 | required: false | ||
71 | } | ||
72 | ] | ||
73 | }, | 66 | }, |
74 | { | 67 | { |
75 | model: VideoModel, | 68 | model: VideoModel, |
@@ -87,8 +80,8 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
87 | toFormattedJSON () { | 80 | toFormattedJSON () { |
88 | let reporterServerHost | 81 | let reporterServerHost |
89 | 82 | ||
90 | if (this.Account.Server) { | 83 | if (this.Account.Actor.Server) { |
91 | reporterServerHost = this.Account.Server.host | 84 | reporterServerHost = this.Account.Actor.Server.host |
92 | } else { | 85 | } else { |
93 | // It means it's our video | 86 | // It means it's our video |
94 | reporterServerHost = CONFIG.WEBSERVER.HOST | 87 | reporterServerHost = CONFIG.WEBSERVER.HOST |