mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +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
|
@ -16,8 +16,7 @@ async function processActivityPubHttpUnicast (job: Bull.Job) {
|
|||
const httpSignatureOptions = await buildSignedRequestOptions(payload)
|
||||
|
||||
const options = {
|
||||
method: 'POST',
|
||||
uri,
|
||||
method: 'POST' as 'POST',
|
||||
json: body,
|
||||
httpSignature: httpSignatureOptions,
|
||||
timeout: REQUEST_TIMEOUT,
|
||||
|
@ -25,7 +24,7 @@ async function processActivityPubHttpUnicast (job: Bull.Job) {
|
|||
}
|
||||
|
||||
try {
|
||||
await doRequest(options)
|
||||
await doRequest(uri, options)
|
||||
ActorFollowScoreCache.Instance.updateActorFollowsScore([ uri ], [])
|
||||
} catch (err) {
|
||||
ActorFollowScoreCache.Instance.updateActorFollowsScore([], [ uri ])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue