mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 18:56:22 +00:00
fix planet switching bugs
This commit is contained in:
@@ -42,9 +42,9 @@ var PlanetStore = Reflux.createStore({
|
||||
})
|
||||
}.bind(this))
|
||||
},
|
||||
fetchPlanet: function (planetName) {
|
||||
fetchPlanet: function (userName, planetName) {
|
||||
request
|
||||
.get(apiUrl + planetName)
|
||||
.get(apiUrl + userName + '/' + planetName)
|
||||
.send()
|
||||
.end(function (err, res) {
|
||||
if (err) {
|
||||
@@ -54,6 +54,8 @@ var PlanetStore = Reflux.createStore({
|
||||
}
|
||||
|
||||
var planet = res.body
|
||||
planet.userName = userName
|
||||
|
||||
planet.Snippets = planet.Snippets.map(function (snippet) {
|
||||
snippet.type = 'snippet'
|
||||
return snippet
|
||||
|
||||
Reference in New Issue
Block a user