feat: add buy product
This commit is contained in:
@@ -8,6 +8,7 @@ export class Transaction {
|
||||
total_data = 0;
|
||||
filterSubCategory = null;
|
||||
visibleModalProduct = false;
|
||||
visibleModalTransaction = false;
|
||||
|
||||
pageCategories = 0;
|
||||
pageSizeCategories = 10
|
||||
@@ -85,6 +86,15 @@ export class Transaction {
|
||||
}
|
||||
}
|
||||
|
||||
async buyProduct(data) {
|
||||
try {
|
||||
const response = await http.post('/transaction/order').send(data);
|
||||
return response;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async update(id, data) {
|
||||
try {
|
||||
const response = await http.put(`/product/${id}`).send(data);
|
||||
|
||||
Reference in New Issue
Block a user