This commit is contained in:
j3d1 2024-06-15 19:13:03 +02:00
parent cf1965a817
commit 3cd3c108de

View file

@ -495,6 +495,12 @@ const store = createStore({
state.fetchedData.tickets = 0;
await Promise.all([dispatch('loadTickets'), dispatch('fetchShippingVouchers')]);
}
},
async createShippingCode({commit, state}, code) {
const {data, success} = await http.post('/2/shipping_codes/', {code}, state.user.token);
if (data && success) {
commit('setShippingCodes', data);
}
}
},
plugins: [