X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fmodel-loaders%2Factor.ts;h=1355d8ee2c836ae74177b2d94e64b33828d8e6fa;hb=57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c;hp=234cb344f06f8bb10e268207bb833eef28cfe61e;hpb=10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4;p=github%2FChocobozzz%2FPeerTube.git 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 @@ import { ActorModel } from '../../models/actor/actor' import { MActorAccountChannelId, MActorFull } from '../../types/models' -type ActorFetchByUrlType = 'all' | 'association-ids' +type ActorLoadByUrlType = 'all' | 'association-ids' -function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType): Promise { +function loadActorByUrl (url: string, fetchType: ActorLoadByUrlType): Promise { if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url) if (fetchType === 'association-ids') return ActorModel.loadByUrl(url) } export { - ActorFetchByUrlType, - fetchActorByUrl + ActorLoadByUrlType, + + loadActorByUrl }