aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-08 14:24:11 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:40 +0100
commitdb4b15f21fbf4e33434e930ffc7fb768cdcf9d42 (patch)
tree418117b84a5c2ee578c210288b698d155422d608 /shared
parent71926aae0762facb25243f27eaf45933b5a37353 (diff)
downloadPeerTube-db4b15f21fbf4e33434e930ffc7fb768cdcf9d42.tar.gz
PeerTube-db4b15f21fbf4e33434e930ffc7fb768cdcf9d42.tar.zst
PeerTube-db4b15f21fbf4e33434e930ffc7fb768cdcf9d42.zip
Use got instead of request
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/requests/activitypub.ts5
-rw-r--r--shared/models/server/job.model.ts2
2 files changed, 3 insertions, 4 deletions
diff --git a/shared/extra-utils/requests/activitypub.ts b/shared/extra-utils/requests/activitypub.ts
index 4762a8665..2a7f20289 100644
--- a/shared/extra-utils/requests/activitypub.ts
+++ b/shared/extra-utils/requests/activitypub.ts
@@ -5,14 +5,13 @@ import { activityPubContextify } from '../../../server/helpers/activitypub'
5 5
6function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) { 6function makePOSTAPRequest (url: string, body: any, httpSignature: any, headers: any) {
7 const options = { 7 const options = {
8 method: 'POST', 8 method: 'POST' as 'POST',
9 uri: url,
10 json: body, 9 json: body,
11 httpSignature, 10 httpSignature,
12 headers 11 headers
13 } 12 }
14 13
15 return doRequest(options) 14 return doRequest(url, options)
16} 15}
17 16
18async function makeFollowRequest (to: { url: string }, by: { url: string, privateKey }) { 17async function makeFollowRequest (to: { url: string }, by: { url: string, privateKey }) {
diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts
index 83ef84457..e4acfee8d 100644
--- a/shared/models/server/job.model.ts
+++ b/shared/models/server/job.model.ts
@@ -59,7 +59,7 @@ export type ActivitypubHttpFetcherPayload = {
59export type ActivitypubHttpUnicastPayload = { 59export type ActivitypubHttpUnicastPayload = {
60 uri: string 60 uri: string
61 signatureActorId?: number 61 signatureActorId?: number
62 body: any 62 body: object
63 contextType?: ContextType 63 contextType?: ContextType
64} 64}
65 65