Skip to content

Commit a97ee4e

Browse files
committed
added middleware for condition data
1 parent 415f3ed commit a97ee4e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

middleware/new-listing-data.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default async function({store}){
2+
await store.dispatch('listing/loadConditions');
3+
}

pages/catalog/newListing/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import CreateListing from "@/components/catalog/NewListing/CreateListing";
1414
1515
export default {
16+
middleware: 'new-listing-data',
1617
components: {
1718
appSearchBook: SearchBook,
1819
appSelectedProduct: SelectedProduct,

store/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
export const actions = {
2-
async nuxtServerInit({dispatch}) {
3-
await dispatch('listing/loadConditions');
4-
}
2+
53
}

0 commit comments

Comments
 (0)