Skip to content

Commit

Permalink
update deprecated github api
Browse files Browse the repository at this point in the history
  • Loading branch information
increpare committed Apr 15, 2020
1 parent 04787cc commit ebad3b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pinball.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function shareClick() {
}
};

var githubURL = 'https://api.github.com/gists?access_token=' + oauthAccessToken;
var githubURL = 'https://api.github.com/gists';
var githubHTTPClient = new XMLHttpRequest();
githubHTTPClient.open('POST', githubURL);
githubHTTPClient.onreadystatechange = function() {
Expand Down Expand Up @@ -422,6 +422,7 @@ function shareClick() {
}
}
githubHTTPClient.setRequestHeader("Content-type","application/x-www-form-urlencoded");
githubHTTPClient.setRequestHeader("Authorization","token "+oauthAccessToken);
var stringifiedGist = JSON.stringify(gistToCreate);
githubHTTPClient.send(stringifiedGist);
lastDownTarget=canvas;
Expand Down

0 comments on commit ebad3b3

Please sign in to comment.