]>
Commit | Line | Data |
---|---|---|
b49f22d8 | 1 | |
10363c74 C |
2 | import { ActorModel } from '../../models/actor/actor' |
3 | import { MActorAccountChannelId, MActorFull } from '../../types/models' | |
e587e0ec | 4 | |
868fce62 | 5 | type ActorLoadByUrlType = 'all' | 'association-ids' |
453e83ea | 6 | |
868fce62 | 7 | function loadActorByUrl (url: string, fetchType: ActorLoadByUrlType): Promise<MActorFull | MActorAccountChannelId> { |
e587e0ec C |
8 | if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url) |
9 | ||
453e83ea | 10 | if (fetchType === 'association-ids') return ActorModel.loadByUrl(url) |
e587e0ec C |
11 | } |
12 | ||
13 | export { | |
868fce62 C |
14 | ActorLoadByUrlType, |
15 | ||
16 | loadActorByUrl | |
e587e0ec | 17 | } |