Skip to content

Commit

Permalink
esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
tubone24 committed Mar 11, 2024
1 parent 3964d2c commit 89265a6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions functions/src/cors-proxy-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ exports.handler = async (event, context) => {
const body = JSON.parse(event.body);
const headers = {
Accept: "application/json",
'Content-Type': 'application/json',
"Content-Type": "application/json",
};

try {
const response = await fetch("https://github.com/login/oauth/access_token", {
method: 'POST',
headers: headers,
body: JSON.stringify(body),
});
const response = await fetch(
"https://github.com/login/oauth/access_token",
{
method: "POST",
headers: headers,
body: JSON.stringify(body),
}
);
const data = await response.json();

console.log({
Expand Down

0 comments on commit 89265a6

Please sign in to comment.