Extract action for API calls

This commit is contained in:
jacob1123 committed 2022-01-26 21:55:36 +00:00
1 parent 0e438e0244
commit 0b1f673c05
2 files changed
+21 -8

No files matched your search

+1 -8
View File
@@ -39,14 +39,7 @@ export default {
let formData = new FormData();
formData.append("transactions", this.$data.transactionsFile);
formData.append("assignments", this.$data.assignmentsFile);
fetch('/api/v1/budget/'+this.$store.getters.CurrentBudget.ID+"/import/ynab", {
method: "POST",
headers: {
'Authorization': 'Bearer ' + this.$store.state.Session.Token
},
body: formData}
);
this.$store.dispatch("YNAB", formData);
}
}
}