trc-client-core
Version:
The core of the TRC Client
19 lines (16 loc) • 685 B
JavaScript
import reflux from 'reflux';
import {get} from 'trc-client-core/src/utils/xhr';
import {
SURVEY_NOTIFICATIONS,
SURVEY_POSSIBLE_COURSES,
SURVEY_CODES
} from 'trc-client-core/src/constants/Endpoints';
var SurveyActions = reflux.createActions({
'getNotificationList': {asyncResult: true},
'getPossibleCourses': {asyncResult: true},
'getSurveyCodes': {asyncResult: true}
});
SurveyActions.getNotificationList.listenAndPromise((query) => get(SURVEY_NOTIFICATIONS, query));
SurveyActions.getPossibleCourses.listenAndPromise(() => get(SURVEY_POSSIBLE_COURSES));
SurveyActions.getSurveyCodes.listenAndPromise(() => get(SURVEY_CODES));
module.exports = SurveyActions;