-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from lisamcho/my_opinions
My opinions: stop following and ignore feature + refactoring
- Loading branch information
Showing
11 changed files
with
186 additions
and
1,374 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
import AppDispatcher from "../dispatcher/AppDispatcher"; | ||
import GuideConstants from "../constants/GuideConstants"; | ||
|
||
const GuideActions = { | ||
/** | ||
* @param {String} id to ignore | ||
*/ | ||
ignore: function (id) { | ||
AppDispatcher.dispatch({ | ||
actionType: GuideConstants.ORG_IGNORE, id | ||
}); | ||
}, | ||
|
||
/** | ||
* @param {String} id to follow | ||
*/ | ||
follow: function (id) { | ||
AppDispatcher.dispatch({ | ||
actionType: GuideConstants.ORG_FOLLOW, id | ||
}); | ||
} | ||
}; | ||
|
||
export default GuideActions; | ||
var Dispatcher = require("../dispatcher/Dispatcher"); | ||
|
||
var GuideActions = (function (_Dispatcher) { | ||
function _GuideActions () { } | ||
|
||
_GuideActions.prototype.ignore = function ignore (we_vote_id) { | ||
_Dispatcher.loadEndpoint("organizationFollowIgnore", { organization_we_vote_id: we_vote_id} ); | ||
}; | ||
|
||
_GuideActions.prototype.follow = function follow (we_vote_id) { | ||
_Dispatcher.loadEndpoint("organizationFollow", { organization_we_vote_id: we_vote_id} ); | ||
}; | ||
|
||
_GuideActions.prototype.stopFollowing = function stopFollowing (we_vote_id) { | ||
_Dispatcher.loadEndpoint("organizationStopFollowing", { organization_we_vote_id: we_vote_id} ); | ||
}; | ||
|
||
_GuideActions.prototype.retrieveGuidesToFollow = function retrieveGuidesToFollow (election_id){ | ||
_Dispatcher.loadEndpoint("voterGuidesToFollowRetrieve", { google_civic_election_id: election_id }); | ||
}; | ||
|
||
_GuideActions.prototype.retrieveGuidesFollowed = function retrieveGuidesFollowed (){ | ||
_Dispatcher.loadEndpoint("voterGuidesFollowedRetrieve"); | ||
}; | ||
|
||
return new _GuideActions(); | ||
}(Dispatcher)); | ||
|
||
module.exports = GuideActions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.