Skip to content

Commit

Permalink
Updated method type as per changes in rest api.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunpati committed Dec 20, 2024
1 parent 83c7d37 commit 81e9b5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/services/ProductStoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ const fetchProductStoresFacilityCount = async (payload: any): Promise <any> => {
const updateProductStore = async (payload: any): Promise <any> => {
return api({
url: `productStores/${payload.productStoreId}`,
method: "post",
method: "put",
data: payload
});
}

const updateDBICCountries = async (payload: any): Promise <any> => {
const addDBICCountries = async (payload: any): Promise <any> => {
return api({
url: "countries/dbic",
method: "post",
Expand Down Expand Up @@ -86,7 +86,7 @@ const updateCompany = async (payload: any): Promise <any> => {
const updateCurrentStoreSettings = async (payload: any): Promise <any> => {
return api({
url: `productStores/${payload.productStoreId}/settings`,
method: "post",
method: "put",
data: payload
});
}
Expand All @@ -100,6 +100,6 @@ export const ProductStoreService = {
fetchProductStoresFacilityCount,
updateCompany,
updateCurrentStoreSettings,
updateDBICCountries,
addDBICCountries,
updateProductStore
}
4 changes: 2 additions & 2 deletions src/views/CreateProductStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ async function manageConfigurations() {
const productStoreId = resp.data.productStoreId;
if(!dbicCountriesCount.value) {
const responses = await Promise.allSettled(selectedCountries.value.map((country: any) => ProductStoreService.updateDBICCountries({
const responses = await Promise.allSettled(selectedCountries.value.map((country: any) => ProductStoreService.addDBICCountries({
geoId: country.geoId,
geoIdTo: "DBIC",
toGeoId: "DBIC",
geoAssocTypeId: "GROUP_MEMBER"
}))
)
Expand Down

0 comments on commit 81e9b5a

Please sign in to comment.