2 import { ActorModel } from '../../models/actor/actor'
3 import { MActorAccountChannelId, MActorFull } from '../../types/models'
5 type ActorLoadByUrlType = 'all' | 'association-ids'
7 function loadActorByUrl (url: string, fetchType: ActorLoadByUrlType): Promise<MActorFull | MActorAccountChannelId> {
8 if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url)
10 if (fetchType === 'association-ids') return ActorModel.loadByUrl(url)