diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-03 18:10:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-03 18:10:56 +0200 |
commit | 868fce62f86812759ccedccf7634236ac3701d9a (patch) | |
tree | 79074e065d885bf8903920bf38af06cb209919b6 /server/lib/model-loaders/actor.ts | |
parent | 10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4 (diff) | |
download | PeerTube-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.ts | 9 |
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 @@ | |||
2 | import { ActorModel } from '../../models/actor/actor' | 2 | import { ActorModel } from '../../models/actor/actor' |
3 | import { MActorAccountChannelId, MActorFull } from '../../types/models' | 3 | import { MActorAccountChannelId, MActorFull } from '../../types/models' |
4 | 4 | ||
5 | type ActorFetchByUrlType = 'all' | 'association-ids' | 5 | type ActorLoadByUrlType = 'all' | 'association-ids' |
6 | 6 | ||
7 | function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType): Promise<MActorFull | MActorAccountChannelId> { | 7 | function 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 | ||
13 | export { | 13 | export { |
14 | ActorFetchByUrlType, | 14 | ActorLoadByUrlType, |
15 | fetchActorByUrl | 15 | |
16 | loadActorByUrl | ||
16 | } | 17 | } |