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

Function addCourses

app/core/store/modules/courses.js:35–38  ·  view source on GitHub ↗
(state, courses)

Source from the content-addressed store, hash-verified

33 mutations: {
34 // TODO this doesn't handle removed courses (unlikely to occur - but would this be simpler if we built an object by id from response and swapped it out
35 addCourses (state, courses) {
36 courses.forEach(c => Vue.set(state.byId, c._id, c))
37 state.loaded = true
38 },
39 addOtherCourses (state, courses) {
40 courses.forEach(c => Vue.set(state.otherById, c._id, c))
41 state.loadedOther = true

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected