mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Use got instead of request
This commit is contained in:
parent
71926aae07
commit
db4b15f21f
32 changed files with 346 additions and 328 deletions
|
@ -3,7 +3,6 @@ import { URL } from 'url'
|
|||
import validator from 'validator'
|
||||
import { ContextType } from '@shared/models/activitypub/context'
|
||||
import { ResultList } from '../../shared/models'
|
||||
import { Activity } from '../../shared/models/activitypub'
|
||||
import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants'
|
||||
import { MActor, MVideoWithHost } from '../types/models'
|
||||
import { pageToStartAndCount } from './core-utils'
|
||||
|
@ -182,10 +181,10 @@ async function activityPubCollectionPagination (
|
|||
|
||||
}
|
||||
|
||||
function buildSignedActivity (byActor: MActor, data: Object, contextType?: ContextType) {
|
||||
function buildSignedActivity <T> (byActor: MActor, data: T, contextType?: ContextType) {
|
||||
const activity = activityPubContextify(data, contextType)
|
||||
|
||||
return signJsonLDObject(byActor, activity) as Promise<Activity>
|
||||
return signJsonLDObject(byActor, activity)
|
||||
}
|
||||
|
||||
function getAPId (activity: string | { id: string }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue