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

Function save

app/core/store/modules/me.js:165–173  ·  view source on GitHub ↗
({ state }, updates)

Source from the content-addressed store, hash-verified

163
164 actions: {
165 save ({ state }, updates) {
166 // updates this module, Backbone me, and server
167 const user = _.assign({}, state, updates)
168 return api.users.put(user)
169 .then(() => {
170 me.set(updates) // will also call updateUser
171 return state
172 })
173 },
174
175 setCh1Avatar ({ state, commit }, { cinematicThangTypeId, cinematicPetThangId, avatarCodeString }) {
176 if (!(cinematicThangTypeId && cinematicPetThangId && avatarCodeString)) {

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected