From 453e83ea5d81d203ba34bc43cd5c2c750ba40568 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Aug 2019 11:53:26 +0200 Subject: Stronger model typings --- server/controllers/api/search.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/controllers/api/search.ts') diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 9a1e30b83..7fef7c173 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts @@ -19,6 +19,7 @@ import { getOrCreateActorAndServerAndModel, getOrCreateVideoAndAccountAndChannel import { logger } from '../../helpers/logger' import { VideoChannelModel } from '../../models/video/video-channel' import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' +import { MChannelAccountDefault, MVideoAccountAllFiles } from '../../typings/models' const searchRouter = express.Router() @@ -84,7 +85,7 @@ async function searchVideoChannelsDB (query: VideoChannelsSearchQuery, res: expr } async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean, res: express.Response) { - let videoChannel: VideoChannelModel + let videoChannel: MChannelAccountDefault let uri = search if (isWebfingerSearch) { @@ -137,7 +138,7 @@ async function searchVideosDB (query: VideosSearchQuery, res: express.Response) } async function searchVideoURI (url: string, res: express.Response) { - let video: VideoModel + let video: MVideoAccountAllFiles // Check if we can fetch a remote video with the URL if (isUserAbleToSearchRemoteURI(res)) { -- cgit v1.2.3 From 0283eaac2a8e73006c66df3cf5bb9012e37450e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Aug 2019 13:52:49 +0200 Subject: Cleanup model types --- server/controllers/api/search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/controllers/api/search.ts') diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index 7fef7c173..349650aca 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts @@ -19,7 +19,7 @@ import { getOrCreateActorAndServerAndModel, getOrCreateVideoAndAccountAndChannel import { logger } from '../../helpers/logger' import { VideoChannelModel } from '../../models/video/video-channel' import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' -import { MChannelAccountDefault, MVideoAccountAllFiles } from '../../typings/models' +import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../../typings/models' const searchRouter = express.Router() @@ -138,7 +138,7 @@ async function searchVideosDB (query: VideosSearchQuery, res: express.Response) } async function searchVideoURI (url: string, res: express.Response) { - let video: MVideoAccountAllFiles + let video: MVideoAccountLightBlacklistAllFiles // Check if we can fetch a remote video with the URL if (isUserAbleToSearchRemoteURI(res)) { -- cgit v1.2.3