({ state }, updates)
| 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)) { |