MCPcopy Index your code
hub / github.com/codecombat/codecombat / setEmailSubscription

Method setEmailSubscription

app/models/User.js:280–284  ·  view source on GitHub ↗
(name, enabled)

Source from the content-addressed store, hash-verified

278 }
279
280 setEmailSubscription (name, enabled) {
281 const newSubs = _.clone(this.get('emails')) || {};
282 (newSubs[name] != null ? newSubs[name] : (newSubs[name] = {})).enabled = enabled
283 return this.set('emails', newSubs)
284 }
285
286 isEmailSubscriptionEnabled (name) { return (this.get('emails') || {})[name]?.enabled }
287

Callers 3

User.spec.jsFile · 0.80
onCheckboxChangedMethod · 0.80
grabOtherDataMethod · 0.80

Calls 3

getMethod · 0.95
cloneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected