aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 16:02:29 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 16:40:32 +0200
commit136d7efde798d3dc0ec0dd18aac674365f7d162e (patch)
tree3a0e2a7a5d04dedf0d8ffda99c2787cecb838891 /server/controllers
parent49af5ac8c2653cb0ef23479c9d3256c5b724d49d (diff)
downloadPeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.tar.gz
PeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.tar.zst
PeerTube-136d7efde798d3dc0ec0dd18aac674365f7d162e.zip
Refactor AP actors
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/search.ts4
-rw-r--r--server/controllers/api/users/me.ts2
-rw-r--r--server/controllers/api/video-channel.ts2
-rw-r--r--server/controllers/lazy-static.ts2
4 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts
index 0cb5674c2..ef0f4285d 100644
--- a/server/controllers/api/search.ts
+++ b/server/controllers/api/search.ts
@@ -15,7 +15,7 @@ import { buildNSFWFilter, isUserAbleToSearchRemoteURI } from '../../helpers/expr
15import { logger } from '../../helpers/logger' 15import { logger } from '../../helpers/logger'
16import { getFormattedObjects } from '../../helpers/utils' 16import { getFormattedObjects } from '../../helpers/utils'
17import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' 17import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger'
18import { getOrCreateActorAndServerAndModel } from '../../lib/activitypub/actor' 18import { getOrCreateAPActor } from '../../lib/activitypub/actors'
19import { 19import {
20 asyncMiddleware, 20 asyncMiddleware,
21 commonVideosFiltersValidator, 21 commonVideosFiltersValidator,
@@ -145,7 +145,7 @@ async function searchVideoChannelURI (search: string, isWebfingerSearch: boolean
145 145
146 if (isUserAbleToSearchRemoteURI(res)) { 146 if (isUserAbleToSearchRemoteURI(res)) {
147 try { 147 try {
148 const actor = await getOrCreateActorAndServerAndModel(uri, 'all', true, true) 148 const actor = await getOrCreateAPActor(uri, 'all', true, true)
149 videoChannel = actor.VideoChannel 149 videoChannel = actor.VideoChannel
150 } catch (err) { 150 } catch (err) {
151 logger.info('Cannot search remote video channel %s.', uri, { err }) 151 logger.info('Cannot search remote video channel %s.', uri, { err })
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 810e4295e..1f2b2f9dd 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -11,7 +11,7 @@ import { CONFIG } from '../../../initializers/config'
11import { MIMETYPES } from '../../../initializers/constants' 11import { MIMETYPES } from '../../../initializers/constants'
12import { sequelizeTypescript } from '../../../initializers/database' 12import { sequelizeTypescript } from '../../../initializers/database'
13import { sendUpdateActor } from '../../../lib/activitypub/send' 13import { sendUpdateActor } from '../../../lib/activitypub/send'
14import { deleteLocalActorImageFile, updateLocalActorImageFile } from '../../../lib/actor-image' 14import { deleteLocalActorImageFile, updateLocalActorImageFile } from '../../../lib/local-actor'
15import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user' 15import { getOriginalVideoFileTotalDailyFromUser, getOriginalVideoFileTotalFromUser, sendVerifyUserEmail } from '../../../lib/user'
16import { 16import {
17 asyncMiddleware, 17 asyncMiddleware,
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts
index 34207ea8a..03aa918d3 100644
--- a/server/controllers/api/video-channel.ts
+++ b/server/controllers/api/video-channel.ts
@@ -13,8 +13,8 @@ import { CONFIG } from '../../initializers/config'
13import { MIMETYPES } from '../../initializers/constants' 13import { MIMETYPES } from '../../initializers/constants'
14import { sequelizeTypescript } from '../../initializers/database' 14import { sequelizeTypescript } from '../../initializers/database'
15import { sendUpdateActor } from '../../lib/activitypub/send' 15import { sendUpdateActor } from '../../lib/activitypub/send'
16import { deleteLocalActorImageFile, updateLocalActorImageFile } from '../../lib/actor-image'
17import { JobQueue } from '../../lib/job-queue' 16import { JobQueue } from '../../lib/job-queue'
17import { deleteLocalActorImageFile, updateLocalActorImageFile } from '../../lib/local-actor'
18import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel' 18import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel'
19import { 19import {
20 asyncMiddleware, 20 asyncMiddleware,
diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts
index 9f260cef0..27b1b7160 100644
--- a/server/controllers/lazy-static.ts
+++ b/server/controllers/lazy-static.ts
@@ -4,8 +4,8 @@ import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache
4import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes' 4import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes'
5import { logger } from '../helpers/logger' 5import { logger } from '../helpers/logger'
6import { LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' 6import { LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants'
7import { actorImagePathUnsafeCache, pushActorImageProcessInQueue } from '../lib/actor-image'
8import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' 7import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache'
8import { actorImagePathUnsafeCache, pushActorImageProcessInQueue } from '../lib/local-actor'
9import { asyncMiddleware } from '../middlewares' 9import { asyncMiddleware } from '../middlewares'
10import { ActorImageModel } from '../models/actor/actor-image' 10import { ActorImageModel } from '../models/actor/actor-image'
11 11