mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-22 14:11:42 +00:00
refactor Actions & add logout action
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
var Reflux = require('reflux')
|
||||
var request = require('superagent')
|
||||
|
||||
var fetchPlanet = require('../Actions/fetchPlanet')
|
||||
|
||||
var updateSnippet = require('../Actions/updateSnippet')
|
||||
var fetchSnippets = require('../Actions/fetchSnippets')
|
||||
var PlanetActions = require('../Actions/PlanetActions')
|
||||
|
||||
var PlanetStore = Reflux.createStore({
|
||||
init: function () {
|
||||
// this.listenTo(updateSnippet, this.updateSnippet)
|
||||
// this.listenTo(fetchSnippets, this.fetchSnippets)
|
||||
this.listenTo(fetchPlanet, this.fetchPlanet)
|
||||
this.listenTo(PlanetActions.fetchPlanet, this.fetchPlanet)
|
||||
},
|
||||
// planetName = user.name/planet.name
|
||||
fetchPlanet: function (planetName) {
|
||||
request
|
||||
.get('http://localhost:8000/' + planetName)
|
||||
|
||||
Reference in New Issue
Block a user