Skip to content

Commit cacf778

Browse files
committed
Flux - 9 - Working with Fetch's Promises
1 parent 0d47fe0 commit cacf778

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

imgur-client/src/app.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var React = require('react');
22
var Routes = require('./routes');
3+
var Api = require('./utils/api');
34

45
React.render(Routes, document.querySelector('.container'));

imgur-client/src/utils/api.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module.exports = {
88
headers: {
99
'Authorization': 'Client-ID ' + apiKey
1010
}
11-
});
11+
})
12+
.then(function(response){
13+
return response.json()
14+
})
1215
}
1316
};

0 commit comments

Comments
 (0)