Skip to content

Commit 56e8e36

Browse files
committed
Rather consider content provided by the user than the hardcoded one.
1 parent 49a435c commit 56e8e36

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Github.js
22
=============
33

4-
Ever wanted to store a file on Github right from the browser? Here you are:
4+
Ever wanted to store a file on Github right from the browser? Here you are.
55

66
```js
77
var github = new Github({

github.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
function postBlob(content, cb) {
9292
var data = {
93-
"content": "Content of the blob",
93+
"content": content,
9494
"encoding": "utf-8"
9595
};
9696
_request("POST", repoPath + "/git/blobs", data, function(err, res) {
@@ -153,7 +153,7 @@
153153

154154
getLatestCommit(function(err, latestCommit) {
155155
getTree(latestCommit, function(err, tree) {
156-
postBlob("It's supposed to be content, baby!", function(err, blob) {
156+
postBlob(content, function(err, blob) {
157157
postTree(tree, path, blob, function(err, tree) {
158158
createCommit(latestCommit, tree, function(err, commit) {
159159
updateHead(commit, function(err) {

0 commit comments

Comments
 (0)