]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/actor.ts
Add timeout on youtube dl to cleaup files
[github/Chocobozzz/PeerTube.git] / server / helpers / actor.ts
CommitLineData
e587e0ec
C
1import { ActorModel } from '../models/activitypub/actor'
2
3type ActorFetchByUrlType = 'all' | 'actor-and-association-ids'
4function fetchActorByUrl (url: string, fetchType: ActorFetchByUrlType) {
5 if (fetchType === 'all') return ActorModel.loadByUrlAndPopulateAccountAndChannel(url)
6
7 if (fetchType === 'actor-and-association-ids') return ActorModel.loadByUrl(url)
8}
9
10export {
11 ActorFetchByUrlType,
12 fetchActorByUrl
13}