feat: change url plural
This commit is contained in:
parent
dfc3ea466f
commit
51e92559e8
|
@ -30,7 +30,7 @@ export class Product {
|
|||
|
||||
async getData() {
|
||||
try {
|
||||
const response = await http.get(`/product/all?supplier=${this.filterSupplier}&category=${this.filterCategory}&subCategory=${this.filterSubCategory}&page=${this.page}&pageSize=${this.pageSize}`);
|
||||
const response = await http.get(`/product/all?supplier=${this.filterSupplier}&category=${this.filterCategory}&sub-category=${this.filterSubCategory}&page=${this.page}&pageSize=${this.pageSize}`);
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
|
@ -44,7 +44,7 @@ export class Product {
|
|||
|
||||
async getDataSubCategories() {
|
||||
try {
|
||||
const response = await http.get(`/product/sub-category?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
|
||||
const response = await http.get(`/product/sub-categories?page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
|
||||
this.dataSubCategories = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
|
@ -57,7 +57,7 @@ export class Product {
|
|||
|
||||
async getDataCategories() {
|
||||
try {
|
||||
const response = await http.get(`/product/category?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`);
|
||||
const response = await http.get(`/product/categories?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`);
|
||||
this.dataCategories = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
|
|
Loading…
Reference in New Issue
Block a user