diff options
Diffstat (limited to 'server/controllers/api/search.ts')
-rw-r--r-- | server/controllers/api/search.ts | 4 |
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' | |||
2 | import { sanitizeUrl } from '@server/helpers/core-utils' | 2 | import { sanitizeUrl } from '@server/helpers/core-utils' |
3 | import { doJSONRequest } from '@server/helpers/requests' | 3 | import { doJSONRequest } from '@server/helpers/requests' |
4 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
5 | import { getOrCreateVideoAndAccountAndChannel } from '@server/lib/activitypub/videos' | 5 | import { getOrCreateAPVideo } from '@server/lib/activitypub/videos' |
6 | import { Hooks } from '@server/lib/plugins/hooks' | 6 | import { Hooks } from '@server/lib/plugins/hooks' |
7 | import { AccountBlocklistModel } from '@server/models/account/account-blocklist' | 7 | import { AccountBlocklistModel } from '@server/models/account/account-blocklist' |
8 | import { getServerActor } from '@server/models/application/application' | 8 | import { 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 }) |