feat: add upload excel product functions

This commit is contained in:
caturbgs
2021-12-23 13:50:26 +07:00
parent edc6d3e317
commit d591615e66
2 changed files with 145 additions and 65 deletions

View File

@@ -107,6 +107,24 @@ export class Product {
console.error(e);
}
}
async uploadExcel(data) {
try {
const response = await http.upload(data);
return response;
} catch (e) {
console.error(e);
}
}
async uploadProduct(data) {
try {
const response = await http.post('/product/upload-product').send(data);
return response;
} catch (e) {
console.error(e);
}
}
}