diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/activitypub.ts | 2 | ||||
-rw-r--r-- | server/helpers/actor.ts | 2 | ||||
-rw-r--r-- | server/helpers/captions-utils.ts | 2 | ||||
-rw-r--r-- | server/helpers/custom-validators/video-ownership.ts | 4 | ||||
-rw-r--r-- | server/helpers/middlewares/accounts.ts | 2 | ||||
-rw-r--r-- | server/helpers/middlewares/video-captions.ts | 2 | ||||
-rw-r--r-- | server/helpers/middlewares/video-channels.ts | 2 | ||||
-rw-r--r-- | server/helpers/middlewares/video-playlists.ts | 2 | ||||
-rw-r--r-- | server/helpers/middlewares/videos.ts | 2 | ||||
-rw-r--r-- | server/helpers/peertube-crypto.ts | 2 | ||||
-rw-r--r-- | server/helpers/video.ts | 2 | ||||
-rw-r--r-- | server/helpers/webfinger.ts | 2 | ||||
-rw-r--r-- | server/helpers/webtorrent.ts | 6 |
13 files changed, 16 insertions, 16 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index ce48fc543..d28453d79 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -6,7 +6,7 @@ import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' | |||
6 | import { signJsonLDObject } from './peertube-crypto' | 6 | import { signJsonLDObject } from './peertube-crypto' |
7 | import { pageToStartAndCount } from './core-utils' | 7 | import { pageToStartAndCount } from './core-utils' |
8 | import { URL } from 'url' | 8 | import { URL } from 'url' |
9 | import { MActor, MVideoAccountLight } from '../typings/models' | 9 | import { MActor, MVideoAccountLight } from '../types/models' |
10 | import { ContextType } from '@shared/models/activitypub/context' | 10 | import { ContextType } from '@shared/models/activitypub/context' |
11 | 11 | ||
12 | function getContextData (type: ContextType) { | 12 | function getContextData (type: ContextType) { |
diff --git a/server/helpers/actor.ts b/server/helpers/actor.ts index 117548a60..015b4a39f 100644 --- a/server/helpers/actor.ts +++ b/server/helpers/actor.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ActorModel } from '../models/activitypub/actor' | 1 | import { ActorModel } from '../models/activitypub/actor' |
2 | import * as Bluebird from 'bluebird' | 2 | import * as Bluebird from 'bluebird' |
3 | import { MActorFull, MActorAccountChannelId } from '../typings/models' | 3 | import { MActorFull, MActorAccountChannelId } from '../types/models' |
4 | 4 | ||
5 | type ActorFetchByUrlType = 'all' | 'association-ids' | 5 | type ActorFetchByUrlType = 'all' | 'association-ids' |
6 | 6 | ||
diff --git a/server/helpers/captions-utils.ts b/server/helpers/captions-utils.ts index 73b6d166d..0dad23759 100644 --- a/server/helpers/captions-utils.ts +++ b/server/helpers/captions-utils.ts | |||
@@ -2,7 +2,7 @@ import { join } from 'path' | |||
2 | import { CONFIG } from '../initializers/config' | 2 | import { CONFIG } from '../initializers/config' |
3 | import * as srt2vtt from 'srt-to-vtt' | 3 | import * as srt2vtt from 'srt-to-vtt' |
4 | import { createReadStream, createWriteStream, move, remove } from 'fs-extra' | 4 | import { createReadStream, createWriteStream, move, remove } from 'fs-extra' |
5 | import { MVideoCaptionFormattable } from '@server/typings/models' | 5 | import { MVideoCaptionFormattable } from '@server/types/models' |
6 | 6 | ||
7 | async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaptionFormattable) { | 7 | async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaptionFormattable) { |
8 | const videoCaptionsDir = CONFIG.STORAGE.CAPTIONS_DIR | 8 | const videoCaptionsDir = CONFIG.STORAGE.CAPTIONS_DIR |
diff --git a/server/helpers/custom-validators/video-ownership.ts b/server/helpers/custom-validators/video-ownership.ts index 2d1849332..ed5f8cc2f 100644 --- a/server/helpers/custom-validators/video-ownership.ts +++ b/server/helpers/custom-validators/video-ownership.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { VideoChangeOwnershipModel } from '../../models/video/video-change-ownership' | 2 | import { VideoChangeOwnershipModel } from '../../models/video/video-change-ownership' |
3 | import { MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' | 3 | import { MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership' |
4 | import { MUserId } from '@server/typings/models' | 4 | import { MUserId } from '@server/types/models' |
5 | 5 | ||
6 | export async function doesChangeVideoOwnershipExist (idArg: number | string, res: Response) { | 6 | export async function doesChangeVideoOwnershipExist (idArg: number | string, res: Response) { |
7 | const id = parseInt(idArg + '', 10) | 7 | const id = parseInt(idArg + '', 10) |
diff --git a/server/helpers/middlewares/accounts.ts b/server/helpers/middlewares/accounts.ts index f5aa0bada..bddea7eaa 100644 --- a/server/helpers/middlewares/accounts.ts +++ b/server/helpers/middlewares/accounts.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { AccountModel } from '../../models/account/account' | 2 | import { AccountModel } from '../../models/account/account' |
3 | import * as Bluebird from 'bluebird' | 3 | import * as Bluebird from 'bluebird' |
4 | import { MAccountDefault } from '../../typings/models' | 4 | import { MAccountDefault } from '../../types/models' |
5 | 5 | ||
6 | function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { | 6 | function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { |
7 | const promise = AccountModel.load(id) | 7 | const promise = AccountModel.load(id) |
diff --git a/server/helpers/middlewares/video-captions.ts b/server/helpers/middlewares/video-captions.ts index 1b2513b60..f5ce29807 100644 --- a/server/helpers/middlewares/video-captions.ts +++ b/server/helpers/middlewares/video-captions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { VideoCaptionModel } from '../../models/video/video-caption' | 2 | import { VideoCaptionModel } from '../../models/video/video-caption' |
3 | import { MVideoId } from '@server/typings/models' | 3 | import { MVideoId } from '@server/types/models' |
4 | 4 | ||
5 | async function doesVideoCaptionExist (video: MVideoId, language: string, res: Response) { | 5 | async function doesVideoCaptionExist (video: MVideoId, language: string, res: Response) { |
6 | const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language) | 6 | const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language) |
diff --git a/server/helpers/middlewares/video-channels.ts b/server/helpers/middlewares/video-channels.ts index 1595ecd94..6eecb8ee5 100644 --- a/server/helpers/middlewares/video-channels.ts +++ b/server/helpers/middlewares/video-channels.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { VideoChannelModel } from '../../models/video/video-channel' | 2 | import { VideoChannelModel } from '../../models/video/video-channel' |
3 | import { MChannelAccountDefault } from '@server/typings/models' | 3 | import { MChannelAccountDefault } from '@server/types/models' |
4 | 4 | ||
5 | async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { | 5 | async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { |
6 | const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) | 6 | const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) |
diff --git a/server/helpers/middlewares/video-playlists.ts b/server/helpers/middlewares/video-playlists.ts index 8e7484483..344104f7c 100644 --- a/server/helpers/middlewares/video-playlists.ts +++ b/server/helpers/middlewares/video-playlists.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 2 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
3 | import { MVideoPlaylist } from '../../typings/models/video/video-playlist' | 3 | import { MVideoPlaylist } from '../../types/models/video/video-playlist' |
4 | 4 | ||
5 | export type VideoPlaylistFetchType = 'summary' | 'all' | 5 | export type VideoPlaylistFetchType = 'summary' | 'all' |
6 | async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { | 6 | async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { |
diff --git a/server/helpers/middlewares/videos.ts b/server/helpers/middlewares/videos.ts index a0bbcdb21..77a48a467 100644 --- a/server/helpers/middlewares/videos.ts +++ b/server/helpers/middlewares/videos.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | MVideoImmutable, | 11 | MVideoImmutable, |
12 | MVideoThumbnail, | 12 | MVideoThumbnail, |
13 | MVideoWithRights | 13 | MVideoWithRights |
14 | } from '@server/typings/models' | 14 | } from '@server/types/models' |
15 | import { VideoFileModel } from '@server/models/video/video-file' | 15 | import { VideoFileModel } from '@server/models/video/video-file' |
16 | 16 | ||
17 | async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { | 17 | async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { |
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 394e97fd5..1655cd7b5 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts | |||
@@ -6,7 +6,7 @@ import { logger } from './logger' | |||
6 | import { cloneDeep } from 'lodash' | 6 | import { cloneDeep } from 'lodash' |
7 | import { createSign, createVerify } from 'crypto' | 7 | import { createSign, createVerify } from 'crypto' |
8 | import * as bcrypt from 'bcrypt' | 8 | import * as bcrypt from 'bcrypt' |
9 | import { MActor } from '../typings/models' | 9 | import { MActor } from '../types/models' |
10 | 10 | ||
11 | const bcryptComparePromise = promisify2<any, string, boolean>(bcrypt.compare) | 11 | const bcryptComparePromise = promisify2<any, string, boolean>(bcrypt.compare) |
12 | const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt) | 12 | const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt) |
diff --git a/server/helpers/video.ts b/server/helpers/video.ts index 4bcc6d0b9..89c85accb 100644 --- a/server/helpers/video.ts +++ b/server/helpers/video.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | MVideoImmutable, | 11 | MVideoImmutable, |
12 | MVideoThumbnail, | 12 | MVideoThumbnail, |
13 | MVideoWithRights | 13 | MVideoWithRights |
14 | } from '@server/typings/models' | 14 | } from '@server/types/models' |
15 | import { Response } from 'express' | 15 | import { Response } from 'express' |
16 | import { DEFAULT_AUDIO_RESOLUTION } from '@server/initializers/constants' | 16 | import { DEFAULT_AUDIO_RESOLUTION } from '@server/initializers/constants' |
17 | import { JobQueue } from '@server/lib/job-queue' | 17 | import { JobQueue } from '@server/lib/job-queue' |
diff --git a/server/helpers/webfinger.ts b/server/helpers/webfinger.ts index 5443a266b..da7e88077 100644 --- a/server/helpers/webfinger.ts +++ b/server/helpers/webfinger.ts | |||
@@ -4,7 +4,7 @@ import { ActorModel } from '../models/activitypub/actor' | |||
4 | import { isTestInstance } from './core-utils' | 4 | import { isTestInstance } from './core-utils' |
5 | import { isActivityPubUrlValid } from './custom-validators/activitypub/misc' | 5 | import { isActivityPubUrlValid } from './custom-validators/activitypub/misc' |
6 | import { WEBSERVER } from '../initializers/constants' | 6 | import { WEBSERVER } from '../initializers/constants' |
7 | import { MActorFull } from '../typings/models' | 7 | import { MActorFull } from '../types/models' |
8 | 8 | ||
9 | const webfinger = new WebFinger({ | 9 | const webfinger = new WebFinger({ |
10 | webfist_fallback: false, | 10 | webfist_fallback: false, |
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index 7cd76d708..089954e32 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts | |||
@@ -6,9 +6,9 @@ import { CONFIG } from '../initializers/config' | |||
6 | import { dirname, join } from 'path' | 6 | import { dirname, join } from 'path' |
7 | import * as createTorrent from 'create-torrent' | 7 | import * as createTorrent from 'create-torrent' |
8 | import { promisify2 } from './core-utils' | 8 | import { promisify2 } from './core-utils' |
9 | import { MVideo } from '@server/typings/models/video/video' | 9 | import { MVideo } from '@server/types/models/video/video' |
10 | import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/typings/models/video/video-file' | 10 | import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file' |
11 | import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/typings/models/video/video-streaming-playlist' | 11 | import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' |
12 | import { WEBSERVER } from '@server/initializers/constants' | 12 | import { WEBSERVER } from '@server/initializers/constants' |
13 | import * as parseTorrent from 'parse-torrent' | 13 | import * as parseTorrent from 'parse-torrent' |
14 | import * as magnetUtil from 'magnet-uri' | 14 | import * as magnetUtil from 'magnet-uri' |