move formData generating logic to api.service

This commit is contained in:
taehoon 2019-03-29 23:39:24 -04:00
parent 562120ae48
commit 903bce40c3
3 changed files with 6 additions and 7 deletions

View file

@ -13,10 +13,7 @@ const Importer = {
},
submit () {
this.uploading = true
// eslint-disable-next-line no-undef
const formData = new FormData()
formData.append('list', this.file)
this.$store.state.api.backendInteractor.followImport({params: formData})
this.$store.state.api.backendInteractor.followImport(this.file)
.then((status) => {
if (status) {
this.success = true