Add logs endpoint
[oweals/peertube.git] / server / helpers / actor.ts
1 import { ActorModel } from '../models/activitypub/actor'
2
3 type ActorFetchByUrlType = 'all' | 'actor-and-association-ids'
4 function 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
10 export {
11   ActorFetchByUrlType,
12   fetchActorByUrl
13 }