Example #1
0
TitanDispatcher.register(function(action) {
    switch(action.actionType) {
        case LeadsConstants.GET_MY_LEADS: {
            LeadsStore.getLeadsByOwner();
            break;
        }
        case LeadsConstants.ADD_LEAD: {
            LeadsStore.addLead(action.data);
            break;
        }
        case LeadsConstants.GET_LEAD_BY_ID: {
            LeadsStore.findLeadById(action.data);
            break;
        }
    }
});