UNPKG

@speakr/speakr-module-services

Version:
21 lines (15 loc) 381 B
"use strict"; const db = require('../../db'); module.exports = { byIdHash }; function byIdHash(options) { let where = { id_hash: options.req.params.id_hash } return db.initiatives.destroy({ where }) .then(initiatives => { options.initiatives = initiatives; return Promise.resolve(options) }).catch(err => { return Promise.reject(err); }) }