scuttle-poll
Version:
Create and vote on polls on ssb
12 lines (9 loc) • 339 B
JavaScript
const buildUpdatedClosingTime = require('../async/buildUpdatedClosingTime')
module.exports = function (server) {
return function publishUpdatedClosingTime ({ poll, closesAt }, cb) {
buildUpdatedClosingTime(server)({ poll, closesAt }, (err, content) => {
if (err) return cb(err)
server.publish(content, cb)
})
}
}