From 5d765bc763aa796bde22e708872130ffce8c9b73 Mon Sep 17 00:00:00 2001 From: caturbgs Date: Fri, 17 Dec 2021 00:02:00 +0700 Subject: [PATCH] feat: change query case --- src/store/product.js | 2 +- src/store/transaction.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/product.js b/src/store/product.js index 175a46e..2b46acd 100644 --- a/src/store/product.js +++ b/src/store/product.js @@ -44,7 +44,7 @@ export class Product { async getDataSubCategories() { try { - const response = await http.get(`/product/subCategory?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`); + const response = await http.get(`/product/sub-category?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`); this.dataSubCategories = response.body.data.map((item, idx) => { item.key = idx; return item diff --git a/src/store/transaction.js b/src/store/transaction.js index ab78d6d..2053402 100644 --- a/src/store/transaction.js +++ b/src/store/transaction.js @@ -32,7 +32,7 @@ export class Transaction { async getData() { try { - const response = await http.get(`/product/by-categories-all?subCategory=${this.filterSubCategory}&page=${this.page}&pageSize=${this.pageSize}`); + const response = await http.get(`/product/by-categories-all?sub-category=${this.filterSubCategory}&page=${this.page}&pageSize=${this.pageSize}`); this.data = response.body.data ?? [] this.total_data = response.body.total_data ?? 0 } catch (e) {