diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-21 11:16:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-21 11:23:32 +0200 |
commit | a91e9beb3fa775633fbac21275af39975c212cb0 (patch) | |
tree | f256cea2b08fd9af73c378672a66a0d2165e634a | |
parent | 35540f3806b9c7428ba2007928ca811d6caa7677 (diff) | |
download | PeerTube-a91e9beb3fa775633fbac21275af39975c212cb0.tar.gz PeerTube-a91e9beb3fa775633fbac21275af39975c212cb0.tar.zst PeerTube-a91e9beb3fa775633fbac21275af39975c212cb0.zip |
Update server dependencies
-rwxr-xr-x | scripts/parse-log.ts | 2 | ||||
-rw-r--r-- | server/helpers/logger.ts | 2 | ||||
-rw-r--r-- | server/lib/redis.ts | 8 | ||||
-rw-r--r-- | server/models/video/video-live-session.ts | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/scripts/parse-log.ts b/scripts/parse-log.ts index d3c93cee5..7a50d9f2f 100755 --- a/scripts/parse-log.ts +++ b/scripts/parse-log.ts | |||
@@ -39,7 +39,7 @@ const loggerFormat = winston.format.printf((info) => { | |||
39 | if (CONFIG.LOG.PRETTIFY_SQL) { | 39 | if (CONFIG.LOG.PRETTIFY_SQL) { |
40 | additionalInfos += '\n' + sqlFormat(info.sql, { | 40 | additionalInfos += '\n' + sqlFormat(info.sql, { |
41 | language: 'sql', | 41 | language: 'sql', |
42 | indent: ' ' | 42 | tabWidth: 2 |
43 | }) | 43 | }) |
44 | } else { | 44 | } else { |
45 | additionalInfos += ' - ' + info.sql | 45 | additionalInfos += ' - ' + info.sql |
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 5fe3646c5..4fbaf8a73 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts | |||
@@ -57,7 +57,7 @@ const consoleLoggerFormat = format.printf(info => { | |||
57 | if (CONFIG.LOG.PRETTIFY_SQL) { | 57 | if (CONFIG.LOG.PRETTIFY_SQL) { |
58 | additionalInfos += '\n' + sqlFormat(info.sql, { | 58 | additionalInfos += '\n' + sqlFormat(info.sql, { |
59 | language: 'sql', | 59 | language: 'sql', |
60 | indent: ' ' | 60 | tabWidth: 2 |
61 | }) | 61 | }) |
62 | } else { | 62 | } else { |
63 | additionalInfos += ' - ' + info.sql | 63 | additionalInfos += ' - ' + info.sql |
diff --git a/server/lib/redis.ts b/server/lib/redis.ts index 158f3c080..d6d053d2f 100644 --- a/server/lib/redis.ts +++ b/server/lib/redis.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { createClient, RedisClientOptions, RedisModules, RedisScripts } from 'redis' | 1 | import { createClient, RedisClientOptions, RedisModules } from 'redis' |
2 | import { exists } from '@server/helpers/custom-validators/misc' | 2 | import { exists } from '@server/helpers/custom-validators/misc' |
3 | import { sha256 } from '@shared/extra-utils' | 3 | import { sha256 } from '@shared/extra-utils' |
4 | import { logger } from '../helpers/logger' | 4 | import { logger } from '../helpers/logger' |
@@ -16,16 +16,12 @@ import { | |||
16 | WEBSERVER | 16 | WEBSERVER |
17 | } from '../initializers/constants' | 17 | } from '../initializers/constants' |
18 | 18 | ||
19 | // Only used for typings | ||
20 | // TODO: remove when https://github.com/microsoft/TypeScript/issues/37181 is fixed | ||
21 | const redisClientWrapperForType = () => createClient<{}, RedisScripts>() | ||
22 | |||
23 | class Redis { | 19 | class Redis { |
24 | 20 | ||
25 | private static instance: Redis | 21 | private static instance: Redis |
26 | private initialized = false | 22 | private initialized = false |
27 | private connected = false | 23 | private connected = false |
28 | private client: ReturnType<typeof redisClientWrapperForType> | 24 | private client: ReturnType<typeof createClient> |
29 | private prefix: string | 25 | private prefix: string |
30 | 26 | ||
31 | private constructor () { | 27 | private constructor () { |
diff --git a/server/models/video/video-live-session.ts b/server/models/video/video-live-session.ts index 2b4cde9f8..836620872 100644 --- a/server/models/video/video-live-session.ts +++ b/server/models/video/video-live-session.ts | |||
@@ -110,7 +110,7 @@ export class VideoLiveSessionModel extends Model<Partial<AttributesOnly<VideoLiv | |||
110 | static listSessionsOfLiveForAPI (options: { videoId: number }) { | 110 | static listSessionsOfLiveForAPI (options: { videoId: number }) { |
111 | const { videoId } = options | 111 | const { videoId } = options |
112 | 112 | ||
113 | const query: FindOptions<VideoLiveSessionModel> = { | 113 | const query: FindOptions<AttributesOnly<VideoLiveSessionModel>> = { |
114 | where: { | 114 | where: { |
115 | liveVideoId: videoId | 115 | liveVideoId: videoId |
116 | }, | 116 | }, |