Skip to content

Commit

Permalink
Version 0.2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Jan 24, 2021
1 parent 0425322 commit 0230370
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
3 changes: 0 additions & 3 deletions middleware/storeRedirect.js

This file was deleted.

5 changes: 1 addition & 4 deletions pages/store/_id/cart.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<script>
import Cart from "@/pages/cart.vue"
export default {
...Cart,
middleware: "storeRedirect",
}
export default Cart
</script>
5 changes: 1 addition & 4 deletions pages/store/_id/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<script>
import Index from "@/pages/index.vue"
export default {
...Index,
middleware: "storeRedirect",
}
export default Index
</script>
5 changes: 1 addition & 4 deletions pages/store/_id/products/_slug.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<script>
import Product from "@/pages/products/_slug.vue"
export default {
...Product,
middleware: "storeRedirect",
}
export default Product
</script>
11 changes: 8 additions & 3 deletions store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ export const getters = {
},
}
export const actions = {
async nuxtServerInit({ commit, dispatch }, { req, $axios }) {
async nuxtServerInit({ commit, dispatch }, { req, $axios, params }) {
await dispatch("loadEnv", { env: this.$config, req })
const { data } = await $axios.get("/manage/stores")
commit("storeID", data.pos_id)
let storeID
if (params.id) storeID = params.id
else {
const { data } = await $axios.get("/manage/stores")
storeID = data.pos_id
}
commit("storeID", storeID)
const { data: services } = await $axios.get("/services")
commit("services", services)
},
Expand Down
2 changes: 1 addition & 1 deletion version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const VERSION = "0.2.1.0"
const VERSION = "0.2.1.1"

export default VERSION

0 comments on commit 0230370

Please sign in to comment.