membership

This commit is contained in:
2021-12-17 14:22:05 +07:00
parent 8c9a3b05de
commit af05055b9e
3 changed files with 33 additions and 9 deletions

View File

@@ -78,6 +78,16 @@ export class Product {
}
}
async buyProduct(data) {
try {
const response = await http.post('/transaction/order').send(data);
await this.getData();
return response;
} catch (e) {
console.error(e);
}
}
async update(id, data) {
try {
const response = await http.put(`/product/${id}`).send(data);