({ commit, state }, slug)
| 24 | }, |
| 25 | actions: { |
| 26 | async fetch ({ commit, state }, slug) { |
| 27 | commit('setLoading', true) |
| 28 | if (state.paymentGroup.slug === slug) { |
| 29 | commit('setLoading', false) |
| 30 | return |
| 31 | } |
| 32 | let paymentGroup |
| 33 | try { |
| 34 | paymentGroup = await getPaymentGroup(slug) |
| 35 | } catch (err) { |
| 36 | console.error('GET paymentGroup failed', err) |
| 37 | return |
| 38 | } |
| 39 | commit('setPaymentGroup', paymentGroup.data) |
| 40 | commit('setLoading', false) |
| 41 | } |
| 42 | } |
| 43 | } |
nothing calls this directly
no test coverage detected