git ssb

0+

Piet / ssb-loomio



Tree: d2a8bebd8082181882ad9ee29e93d8df75abcb15

Files: d2a8bebd8082181882ad9ee29e93d8df75abcb15 / poll / async / chooseOne.js

399 bytesRaw
1const ChooseOne = require('../sync/chooseOne')
2const isPoll = require('../../isPoll')
3
4module.exports = function (server) {
5 return function publishChooseOne (opts, cb) {
6 const poll = ChooseOne(opts)
7 console.log('poll', poll)
8 console.log('isChooseOnePoll', require('../../isPoll'))
9 if (!isPoll.chooseOne(poll)) return cb(isPoll.chooseOne.errors)
10
11 server.publish(poll, cb)
12 }
13}
14

Built with git-ssb-web