UNPKG

scuttle-poll

Version:

Create and vote on polls on ssb

12 lines (9 loc) 330 B
const buildChooseOne = require('./buildChooseOne') module.exports = function (server) { return function publishChooseOne ({ poll, choice, reason, mentions }, cb) { buildChooseOne(server)({ poll, choice, reason, mentions }, (err, position) => { if (err) return cb(err) server.publish(position, cb) }) } }