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

Function loadInteractive

app/core/store/modules/interactives.js:113–129  ·  view source on GitHub ↗
({ commit }, interactiveIdOrSlug)

Source from the content-addressed store, hash-verified

111
112 actions: {
113 async loadInteractive ({ commit }, interactiveIdOrSlug) {
114 commit('toggleInteractiveLoading')
115
116 try {
117 const interactive = await getInteractive(interactiveIdOrSlug)
118 if (!interactive) {
119 throw new Error('Invalid interactive received')
120 }
121
122 commit('addInteractive', interactive)
123 } catch (e) {
124 // TODO handle_error_ozaria
125 throw new Error('Failed to load interactive')
126 } finally {
127 commit('toggleInteractiveLoading')
128 }
129 },
130
131 async loadInteractiveSession ({ commit }, { interactiveIdOrSlug, sessionOptions }) {
132 commit('toggleInteractiveSessionLoading')

Callers

nothing calls this directly

Calls 1

getInteractiveFunction · 0.90

Tested by

no test coverage detected