aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-14 14:15:23 +0100
committerChocobozzz <me@florianbigard.com>2022-01-14 14:15:23 +0100
commitc0d2eac3329ec4454a178a4442bdcf20c388c8ff (patch)
tree7554ccac3b1cb43605f524ba6f9770ac6c3ed30d /server
parentc9c0cc5179359b6a9fa7c46bf73df99c4f72c1fc (diff)
downloadPeerTube-c0d2eac3329ec4454a178a4442bdcf20c388c8ff.tar.gz
PeerTube-c0d2eac3329ec4454a178a4442bdcf20c388c8ff.tar.zst
PeerTube-c0d2eac3329ec4454a178a4442bdcf20c388c8ff.zip
Update server dependencies
Diffstat (limited to 'server')
-rw-r--r--server/lib/redis.ts6
-rw-r--r--server/models/utils.ts3
-rw-r--r--server/models/video/video.ts3
3 files changed, 8 insertions, 4 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts
index 52766663a..f544274ea 100644
--- a/server/lib/redis.ts
+++ b/server/lib/redis.ts
@@ -365,8 +365,10 @@ class Redis {
365 return this.client.incr(this.prefix + key) 365 return this.client.incr(this.prefix + key)
366 } 366 }
367 367
368 private exists (key: string) { 368 private async exists (key: string) {
369 return this.client.exists(this.prefix + key) 369 const result = await this.client.exists(this.prefix + key)
370
371 return result !== 0
370 } 372 }
371 373
372 private setExpiration (key: string, ms: number) { 374 private setExpiration (key: string, ms: number) {
diff --git a/server/models/utils.ts b/server/models/utils.ts
index 6a109056f..8c694d4e5 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -238,7 +238,8 @@ function searchAttribute (sourceField?: string, targetField?: string) {
238 238
239 return { 239 return {
240 [targetField]: { 240 [targetField]: {
241 [Op.iLike]: `%${sourceField}%` 241 // FIXME: ts error
242 [Op.iLike as any]: `%${sourceField}%`
242 } 243 }
243 } 244 }
244} 245}
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 12b937574..9111c71b0 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1488,7 +1488,8 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1488 required: false, 1488 required: false,
1489 where: { 1489 where: {
1490 startDate: { 1490 startDate: {
1491 [Op.gte]: new Date(new Date().getTime() - (24 * 3600 * 1000) * trendingDays) 1491 // FIXME: ts error
1492 [Op.gte as any]: new Date(new Date().getTime() - (24 * 3600 * 1000) * trendingDays)
1492 } 1493 }
1493 } 1494 }
1494 } 1495 }