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

Function getAll

app/core/api/skipped-contacts.js:13–25  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

11
12module.exports = {
13 getAll (options) {
14 return fetchJson('/db/skipped-contact', options).then(function (contacts) {
15 contacts.forEach(function (contact) {
16 contact.email = (contact.trialRequest != null ? contact.trialRequest.properties.email : undefined) || (contact.zpContact != null ? contact.zpContact.email : undefined)
17 if ((contact.trialRequest != null ? contact.trialRequest.created : undefined)) {
18 contact.dateCreated = new Date(contact.trialRequest.created)
19 } else {
20 contact.dateCreated = utils.objectIdToDate(contact._id)
21 }
22 })
23 return contacts
24 })
25 },
26
27 put (skippedContact, options) {
28 return fetchJson(`/db/skipped-contact/${skippedContact._id}`, _.assign({}, options, {

Callers

nothing calls this directly

Calls 1

objectIdToDateMethod · 0.80

Tested by

no test coverage detected