authorize upload

This commit is contained in:
softprops 2021-08-07 23:38:44 -04:00
parent 935aebbf1d
commit 085ff2701b
2 changed files with 8 additions and 4 deletions

6
dist/index.js vendored
View file

@ -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;

View file

@ -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;