aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-10-21 14:50:55 +0200
committerChocobozzz <me@florianbigard.com>2019-10-21 15:03:28 +0200
commitd5d9b6d7bfb7e9426b6462f7fdf285df39eea820 (patch)
treeaa21a16be3df94b5c6fd264d1090ed9ac7c94a79 /server/models
parentf6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace (diff)
downloadPeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.tar.gz
PeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.tar.zst
PeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.zip
Update server dependencies
Diffstat (limited to 'server/models')
-rw-r--r--server/models/account/account-video-rate.ts2
-rw-r--r--server/models/activitypub/actor.ts2
-rw-r--r--server/models/video/video-file.ts2
-rw-r--r--server/models/video/video-playlist-element.ts2
-rw-r--r--server/models/video/video-share.ts2
-rw-r--r--server/models/video/video.ts2
6 files changed, 5 insertions, 7 deletions
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts
index a6edbeee8..c593595b2 100644
--- a/server/models/account/account-video-rate.ts
+++ b/server/models/account/account-video-rate.ts
@@ -150,7 +150,7 @@ export class AccountVideoRateModel extends Model<AccountVideoRateModel> {
150 static loadLocalAndPopulateVideo ( 150 static loadLocalAndPopulateVideo (
151 rateType: VideoRateType, 151 rateType: VideoRateType,
152 accountName: string, 152 accountName: string,
153 videoId: number, 153 videoId: number | string,
154 t?: Transaction 154 t?: Transaction
155 ): Bluebird<MAccountVideoRateAccountVideo> { 155 ): Bluebird<MAccountVideoRateAccountVideo> {
156 const options: FindOptions = { 156 const options: FindOptions = {
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index 05de1905d..535ebd792 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -430,8 +430,6 @@ export class ActorModel extends Model<ActorModel> {
430 } 430 }
431 431
432 toActivityPubObject (this: MActorAP, name: string) { 432 toActivityPubObject (this: MActorAP, name: string) {
433 let activityPubType
434
435 let icon = undefined 433 let icon = undefined
436 if (this.avatarId) { 434 if (this.avatarId) {
437 const extension = extname(this.Avatar.filename) 435 const extension = extname(this.Avatar.filename)
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 6304f741c..68e2d562a 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -99,7 +99,7 @@ export class VideoFileModel extends Model<VideoFileModel> {
99 static doesInfohashExist (infoHash: string) { 99 static doesInfohashExist (infoHash: string) {
100 const query = 'SELECT 1 FROM "videoFile" WHERE "infoHash" = $infoHash LIMIT 1' 100 const query = 'SELECT 1 FROM "videoFile" WHERE "infoHash" = $infoHash LIMIT 1'
101 const options = { 101 const options = {
102 type: QueryTypes.SELECT, 102 type: QueryTypes.SELECT as QueryTypes.SELECT,
103 bind: { infoHash }, 103 bind: { infoHash },
104 raw: true 104 raw: true
105 } 105 }
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts
index a28021313..9d2ea710e 100644
--- a/server/models/video/video-playlist-element.ts
+++ b/server/models/video/video-playlist-element.ts
@@ -181,7 +181,7 @@ export class VideoPlaylistElementModel extends Model<VideoPlaylistElementModel>
181 return VideoPlaylistElementModel.findOne(query) 181 return VideoPlaylistElementModel.findOne(query)
182 } 182 }
183 183
184 static loadById (playlistElementId: number): Bluebird<MVideoPlaylistElement> { 184 static loadById (playlistElementId: number | string): Bluebird<MVideoPlaylistElement> {
185 return VideoPlaylistElementModel.findByPk(playlistElementId) 185 return VideoPlaylistElementModel.findByPk(playlistElementId)
186 } 186 }
187 187
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts
index 9019b401a..50525b4c2 100644
--- a/server/models/video/video-share.ts
+++ b/server/models/video/video-share.ts
@@ -90,7 +90,7 @@ export class VideoShareModel extends Model<VideoShareModel> {
90 }) 90 })
91 Video: VideoModel 91 Video: VideoModel
92 92
93 static load (actorId: number, videoId: number, t?: Transaction): Bluebird<MVideoShareActor> { 93 static load (actorId: number | string, videoId: number | string, t?: Transaction): Bluebird<MVideoShareActor> {
94 return VideoShareModel.scope(ScopeNames.WITH_ACTOR).findOne({ 94 return VideoShareModel.scope(ScopeNames.WITH_ACTOR).findOne({
95 where: { 95 where: {
96 actorId, 96 actorId,
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 0ee3feaf3..0d1dbf106 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1608,7 +1608,7 @@ export class VideoModel extends Model<VideoModel> {
1608 'LIMIT 1' 1608 'LIMIT 1'
1609 1609
1610 const options = { 1610 const options = {
1611 type: QueryTypes.SELECT, 1611 type: QueryTypes.SELECT as QueryTypes.SELECT,
1612 bind: { followerActorId, videoId }, 1612 bind: { followerActorId, videoId },
1613 raw: true 1613 raw: true
1614 } 1614 }