diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-22 10:43:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-22 10:43:11 +0200 |
commit | 5c5e587307a27e173333789b5b5167d35f468b01 (patch) | |
tree | 94e3721caf2e11d38fd5f4112c0fc98da89ac535 /server/controllers/api/search.ts | |
parent | 1b42d73f44811eec1b7ddd72dd0d640a57c3376c (diff) | |
parent | b5fecbf44192144d1ca27c23a0b53922de288c10 (diff) | |
download | PeerTube-5c5e587307a27e173333789b5b5167d35f468b01.tar.gz PeerTube-5c5e587307a27e173333789b5b5167d35f468b01.tar.zst PeerTube-5c5e587307a27e173333789b5b5167d35f468b01.zip |
Merge branch 'feature/strong-model-types' into develop
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r-- | server/controllers/api/search.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 9a1e30b83..349650aca 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts | |||
@@ -19,6 +19,7 @@ import { getOrCreateActorAndServerAndModel, getOrCreateVideoAndAccountAndChannel | |||
19 | import { logger } from '../../helpers/logger' | 19 | import { logger } from '../../helpers/logger' |
20 | import { VideoChannelModel } from '../../models/video/video-channel' | 20 | import { VideoChannelModel } from '../../models/video/video-channel' |
21 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' | 21 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' |
22 | import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../../typings/models' | ||
22 | 23 | ||
23 | const searchRouter = express.Router() | 24 | const searchRouter = express.Router() |
24 | 25 | ||
@@ -84,7 +85,7 @@ async function searchVideoChannelsDB (query: VideoChannelsSearchQuery, res: expr | |||
84 | } | 85 | } |
85 | 86 | ||
86 | async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean, res: express.Response) { | 87 | async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean, res: express.Response) { |
87 | let videoChannel: VideoChannelModel | 88 | let videoChannel: MChannelAccountDefault |
88 | let uri = search | 89 | let uri = search |
89 | 90 | ||
90 | if (isWebfingerSearch) { | 91 | if (isWebfingerSearch) { |
@@ -137,7 +138,7 @@ async function searchVideosDB (query: VideosSearchQuery, res: express.Response) | |||
137 | } | 138 | } |
138 | 139 | ||
139 | async function searchVideoURI (url: string, res: express.Response) { | 140 | async function searchVideoURI (url: string, res: express.Response) { |
140 | let video: VideoModel | 141 | let video: MVideoAccountLightBlacklistAllFiles |
141 | 142 | ||
142 | // Check if we can fetch a remote video with the URL | 143 | // Check if we can fetch a remote video with the URL |
143 | if (isUserAbleToSearchRemoteURI(res)) { | 144 | if (isUserAbleToSearchRemoteURI(res)) { |