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

Method getEnabledEmails

app/models/User.js:266–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 }
265
266 getEnabledEmails () {
267 return (() => {
268 const result = []
269 const object = this.get('emails', true)
270 for (const emailName in object) {
271 const emailDoc = object[emailName]
272 if (emailDoc.enabled) {
273 result.push(emailName)
274 }
275 }
276 return result
277 })()
278 }
279
280 setEmailSubscription (name, enabled) {
281 const newSubs = _.clone(this.get('emails')) || {};

Callers 1

getEmailSubsDictMethod · 0.80

Calls 1

getMethod · 0.95

Tested by

no test coverage detected