1
0
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:
Rokt33r
2015-07-14 01:20:17 +09:00
parent b0d9895e5e
commit 8b10eb130a
19 changed files with 69 additions and 94 deletions

View File

@@ -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)