This commit is contained in:
syuilo 2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View file

@ -12,13 +12,13 @@ export default async (user: { id: User['id'] }, url: string, object: any) => {
const req = createSignedPost({
key: {
privateKeyPem: keypair.privateKey,
keyId: `${config.url}/users/${user.id}#main-key`
keyId: `${config.url}/users/${user.id}#main-key`,
},
url,
body,
additionalHeaders: {
'User-Agent': config.userAgent,
}
},
});
await getResponse({
@ -40,18 +40,18 @@ export async function signedGet(url: string, user: { id: User['id'] }) {
const req = createSignedGet({
key: {
privateKeyPem: keypair.privateKey,
keyId: `${config.url}/users/${user.id}#main-key`
keyId: `${config.url}/users/${user.id}#main-key`,
},
url,
additionalHeaders: {
'User-Agent': config.userAgent,
}
},
});
const res = await getResponse({
url,
method: req.request.method,
headers: req.request.headers
headers: req.request.headers,
});
return await res.json();