UNPKG

@speakr/speakr-module-services

Version:
24 lines (18 loc) 483 B
"use strict"; const db = require('../../db'); module.exports = function(options){ let where = { influencer_id: options.influencers.id, network_id: options.networks ? options.networks.id : { $not: null }, status: 'pending' }; return db.invoices.update(options.update, { where }) .then(invoices => { if (!!invoices) { return Promise.resolve(options); } else { return Promise.reject(options); } } ); };