git ssb

0+

Piet / ssb-loomio



Commit 3f4d140a4dd5dc3eb9a025d3d8a9e6272156a067

fix error reporter

mix irving committed on 5/4/2018, 4:11:30 AM
Parent: 499687916fec256f9f5439cc8479674da2ce180d

Files changed

poll/async/publishChooseOne.jschanged
poll/async/publishChooseOne.jsView
@@ -1,11 +1,11 @@
11 const ChooseOne = require('../sync/buildChooseOne')
2-const { isPoll } = require('ssb-poll-schema')
2+const { isPoll, getPollErrors } = require('ssb-poll-schema')
33
44 module.exports = function (server) {
55 return function publishChooseOne (opts, cb) {
66 const poll = ChooseOne(opts)
7- if (!isPoll.chooseOne(poll)) return cb(isPoll.chooseOne.errors)
7+ if (!isPoll.chooseOne(poll)) return cb(getPollErrors(poll))
88
99 server.publish(poll, cb)
1010 }
1111 }

Built with git-ssb-web