(options)
| 11 | |
| 12 | module.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, { |
nothing calls this directly
no test coverage detected