From 085ff2701ba0cf1ff451706f53180df1a16d1382 Mon Sep 17 00:00:00 2001 From: softprops Date: Sat, 7 Aug 2021 23:38:44 -0400 Subject: [PATCH] authorize upload --- dist/index.js | 6 ++++-- src/github.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index ad7b416..95a7fbd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2507,12 +2507,14 @@ exports.upload = (gh, url, path) => __awaiter(void 0, void 0, void 0, function* const resp = yield node_fetch_1.default(endpoint, { headers: { "content-length": `${size}`, - "content-type": mime + "content-type": mime, + authorization: `${gh.auth}` }, method: "POST", body }); - console.log(`resp`, resp); + console.log(`resp headers`, resp.headers); + console.log(resp.status); const json = yield resp.json(); console.log(`body`, json); return json; diff --git a/src/github.ts b/src/github.ts index c82896c..ab44225 100644 --- a/src/github.ts +++ b/src/github.ts @@ -140,12 +140,14 @@ export const upload = async ( const resp = await fetch(endpoint, { headers: { "content-length": `${size}`, - "content-type": mime + "content-type": mime, + authorization: `${gh.auth}` }, method: "POST", body }); - console.log(`resp`, resp); + console.log(`resp headers`, resp.headers); + console.log(resp.status); const json = await resp.json(); console.log(`body`, json); return json;