UNPKG

@speakr/speakr-module-services

Version:
23 lines (16 loc) 387 B
"use strict"; const db = require('../../db'); module.exports = { byId }; function byId(options) { let where = { id: options.req.params.optout_id }; return db.optouts.destroy({ where }) .then(optouts => { options.optouts = optouts; return db.optouts.findOne({ where }) .then(optouts => { return Promise.resolve(options); }); }) }