aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/model-loaders/actor.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 18:10:56 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 18:10:56 +0200
commit868fce62f86812759ccedccf7634236ac3701d9a (patch)
tree79074e065d885bf8903920bf38af06cb209919b6 /server/lib/model-loaders/actor.ts
parent10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4 (diff)
downloadPeerTube-868fce62f86812759ccedccf7634236ac3701d9a.tar.gz
PeerTube-868fce62f86812759ccedccf7634236ac3701d9a.tar.zst
PeerTube-868fce62f86812759ccedccf7634236ac3701d9a.zip
fetch -> load
avoid confusion with AP fetch functions
Diffstat (limited to 'server/lib/model-loaders/actor.ts')
-rw-r--r--server/lib/model-loaders/actor.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/lib/model-loaders/actor.ts b/server/lib/model-loaders/actor.ts
index 234cb344f..1355d8ee2 100644
--- a/server/lib/model-loaders/actor.ts
+++ b/server/lib/model-loaders/actor.ts
@@ -2,15 +2,16 @@
2import { ActorModel } from '../../models/actor/actor' 2import { ActorModel } from '../../models/actor/actor'
3import { MActorAccountChannelId, MActorFull } from '../../types/models' 3import { MActorAccountChannelId, MActorFull } from '../../types/models'
4 4
5type ActorFetchByUrlType = 'all' | 'association-ids' 5type ActorLoadByUrlType = 'all' | 'association-ids'
6 6
7function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType): Promise<MActorFull | MActorAccountChannelId> { 7function loadActorByUrl (url: string, fetchType: ActorLoadByUrlType): Promise<MActorFull | MActorAccountChannelId> {
8 if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url) 8 if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url)
9 9
10 if (fetchType === 'association-ids') return ActorModel.loadByUrl(url) 10 if (fetchType === 'association-ids') return ActorModel.loadByUrl(url)
11} 11}
12 12
13export { 13export {
14 ActorFetchByUrlType, 14 ActorLoadByUrlType,
15 fetchActorByUrl 15
16 loadActorByUrl
16} 17}