MCPcopy Create free account
hub / github.com/codecombat/codecombat / fetch

Function fetch

app/core/store/modules/paymentGroups.js:26–41  ·  view source on GitHub ↗
({ commit, state }, slug)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 2

getPaymentGroupFunction · 0.90
errorMethod · 0.45

Tested by

no test coverage detected