Skip to content
Snippets Groups Projects
Commit b2598451 authored by timwis's avatar timwis
Browse files

Merge branch 'wilsaj-github-api-v2.3.0' into gh-pages

parents 5a634a92 8b2c48c0
No related branches found
Tags v1.0.2
No related merge requests found
......@@ -30,7 +30,7 @@
"dependencies": {
"ampersand-state": "^5.0.0",
"bootstrap": "^3.3.6",
"github-api": "github:michael/github#849e058",
"github-api": "^2.3.0",
"jquery-deparam": "^0.5.2",
"jquery-serializejson": "^2.6.2",
"js-cookie": "^2.1.0",
......
This diff is collapsed.
......@@ -32,7 +32,7 @@ export default State.extend({
},
read: function () {
return new Promise((resolve, reject) => {
this.repo.read(this.repoBranch, this.filePath, (err, contents) => {
this.repo.getContents(this.repoBranch, this.filePath, (err, contents) => {
if (err) reject(err)
else resolve(contents)
})
......@@ -41,7 +41,7 @@ export default State.extend({
save: function (contents, commitMsg) {
return new Promise((resolve, reject) => {
if (!commitMsg) commitMsg = `Updated ${this.fileName}`
this.repo.write(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
this.repo.writeFile(this.repoBranch, this.filePath, contents, commitMsg, {}, (err, data) => {
if (err) reject(err)
else resolve(data)
})
......@@ -49,7 +49,7 @@ export default State.extend({
},
remove: function () {
return new Promise((resolve, reject) => {
this.repo.remove(this.repoBranch, this.filePath, (err, data) => {
this.repo.deleteFile(this.repoBranch, this.filePath, (err, data) => {
if (err) reject(err)
else resolve(data)
})
......
......@@ -75,7 +75,7 @@ export default State.extend({
auth: 'oauth'
})
const user = github.getUser()
user.show(null, (err, userData) => {
user.getProfile((err, userData) => {
if (err) reject(err)
else resolve(userData)
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment