Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use config manager in Importers #54

Merged
merged 13 commits into from
Jun 12, 2020
18 changes: 17 additions & 1 deletion src/store/modules/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const ADD_IMPORTER_ACTION = 'ADD_IMPORTER_ACTION';

const state = {
scraping: {
numDaysBack: 40,
@@ -8,6 +10,20 @@ const state = {
monitoring: {}
};

const mutations = {
addImporter: (state, importer) => {
state.scraping.accountsToScrape.push(importer);
}
};

const actions = {
[ADD_IMPORTER_ACTION]: ({ commit }, importer) => {
commit('addImporter', importer);
}
};

export default {
state
state,
mutations,
actions,
};