aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-18 10:45:25 +0200
committerChocobozzz <me@florianbigard.com>2020-06-18 10:46:27 +0200
commit26d6bf6533023326fa017812cf31bbe20c752d36 (patch)
tree9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/helpers/middlewares
parentd6d951ddc0c492f3261065b5dcb4df0534d252fc (diff)
downloadPeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip
Split types and typings
Diffstat (limited to 'server/helpers/middlewares')
-rw-r--r--server/helpers/middlewares/accounts.ts2
-rw-r--r--server/helpers/middlewares/video-captions.ts2
-rw-r--r--server/helpers/middlewares/video-channels.ts2
-rw-r--r--server/helpers/middlewares/video-playlists.ts2
-rw-r--r--server/helpers/middlewares/videos.ts2
5 files changed, 5 insertions, 5 deletions
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 @@
1import { Response } from 'express' 1import { Response } from 'express'
2import { AccountModel } from '../../models/account/account' 2import { AccountModel } from '../../models/account/account'
3import * as Bluebird from 'bluebird' 3import * as Bluebird from 'bluebird'
4import { MAccountDefault } from '../../typings/models' 4import { MAccountDefault } from '../../types/models'
5 5
6function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { 6function 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 @@
1import { Response } from 'express' 1import { Response } from 'express'
2import { VideoCaptionModel } from '../../models/video/video-caption' 2import { VideoCaptionModel } from '../../models/video/video-caption'
3import { MVideoId } from '@server/typings/models' 3import { MVideoId } from '@server/types/models'
4 4
5async function doesVideoCaptionExist (video: MVideoId, language: string, res: Response) { 5async 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 @@
1import * as express from 'express' 1import * as express from 'express'
2import { VideoChannelModel } from '../../models/video/video-channel' 2import { VideoChannelModel } from '../../models/video/video-channel'
3import { MChannelAccountDefault } from '@server/typings/models' 3import { MChannelAccountDefault } from '@server/types/models'
4 4
5async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { 5async 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 @@
1import * as express from 'express' 1import * as express from 'express'
2import { VideoPlaylistModel } from '../../models/video/video-playlist' 2import { VideoPlaylistModel } from '../../models/video/video-playlist'
3import { MVideoPlaylist } from '../../typings/models/video/video-playlist' 3import { MVideoPlaylist } from '../../types/models/video/video-playlist'
4 4
5export type VideoPlaylistFetchType = 'summary' | 'all' 5export type VideoPlaylistFetchType = 'summary' | 'all'
6async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { 6async 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'
15import { VideoFileModel } from '@server/models/video/video-file' 15import { VideoFileModel } from '@server/models/video/video-file'
16 16
17async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { 17async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') {