aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r--server/controllers/api/search.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index 77e3a024d..0cb5674c2 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -2,7 +2,7 @@ import * as express from 'express'
2import { sanitizeUrl } from '@server/helpers/core-utils' 2import { sanitizeUrl } from '@server/helpers/core-utils'
3import { doJSONRequest } from '@server/helpers/requests' 3import { doJSONRequest } from '@server/helpers/requests'
4import { CONFIG } from '@server/initializers/config' 4import { CONFIG } from '@server/initializers/config'
5import { getOrCreateVideoAndAccountAndChannel } from '@server/lib/activitypub/videos' 5import { getOrCreateAPVideo } from '@server/lib/activitypub/videos'
6import { Hooks } from '@server/lib/plugins/hooks' 6import { Hooks } from '@server/lib/plugins/hooks'
7import { AccountBlocklistModel } from '@server/models/account/account-blocklist' 7import { AccountBlocklistModel } from '@server/models/account/account-blocklist'
8import { getServerActor } from '@server/models/application/application' 8import { getServerActor } from '@server/models/application/application'
@@ -244,7 +244,7 @@ async function searchVideoURI (url: string, res: express.Response) {
244 refreshVideo: false 244 refreshVideo: false
245 } 245 }
246 246
247 const result = await getOrCreateVideoAndAccountAndChannel({ videoObject: url, syncParam }) 247 const result = await getOrCreateAPVideo({ videoObject: url, syncParam })
248 video = result ? result.video : undefined 248 video = result ? result.video : undefined
249 } catch (err) { 249 } catch (err) {
250 logger.info('Cannot search remote video %s.', url, { err }) 250 logger.info('Cannot search remote video %s.', url, { err })