From e543ffe368e842d4501d6d46d918c8c9203a9867 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 7 Mar 2024 11:38:23 +0000 Subject: [PATCH] fix type --- packages/backend/src/core/activitypub/ApRequestService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts index 631430e46a..420844cc17 100644 --- a/packages/backend/src/core/activitypub/ApRequestService.ts +++ b/packages/backend/src/core/activitypub/ApRequestService.ts @@ -19,7 +19,7 @@ import type { PrivateKeyWithPem, PrivateKey } from '@misskey-dev/node-http-messa export async function createSignedPost(args: { level: string; key: PrivateKey; url: string; body: string; digest?: string, additionalHeaders: Record }) { const u = new URL(args.url); - const request: RequestLike = { + const request = { url: u.href, method: 'POST', headers: { @@ -27,7 +27,7 @@ export async function createSignedPost(args: { level: string; key: PrivateKey; u 'Host': u.host, 'Content-Type': 'application/activity+json', ...args.additionalHeaders, - }, + } as Record, }; // TODO: httpMessageSignaturesImplementationLevelによって新規格で通信をするようにする @@ -48,7 +48,7 @@ export async function createSignedPost(args: { level: string; key: PrivateKey; u export async function createSignedGet(args: { level: string; key: PrivateKey; url: string; additionalHeaders: Record }) { const u = new URL(args.url); - const request: RequestLike = { + const request = { url: u.href, method: 'GET', headers: { @@ -56,7 +56,7 @@ export async function createSignedGet(args: { level: string; key: PrivateKey; ur 'Date': new Date().toUTCString(), 'Host': new URL(args.url).host, ...args.additionalHeaders, - }, + } as Record, }; // TODO: httpMessageSignaturesImplementationLevelによって新規格で通信をするようにする