Commit 3f4d140a4dd5dc3eb9a025d3d8a9e6272156a067
fix error reporter
mix irving committed on 5/4/2018, 4:11:30 AMParent: 499687916fec256f9f5439cc8479674da2ce180d
Files changed
poll/async/publishChooseOne.js | changed |
poll/async/publishChooseOne.js | ||
---|---|---|
@@ -1,11 +1,11 @@ | ||
1 | 1 | const ChooseOne = require('../sync/buildChooseOne') |
2 | -const { isPoll } = require('ssb-poll-schema') | |
2 | +const { isPoll, getPollErrors } = require('ssb-poll-schema') | |
3 | 3 | |
4 | 4 | module.exports = function (server) { |
5 | 5 | return function publishChooseOne (opts, cb) { |
6 | 6 | const poll = ChooseOne(opts) |
7 | - if (!isPoll.chooseOne(poll)) return cb(isPoll.chooseOne.errors) | |
7 | + if (!isPoll.chooseOne(poll)) return cb(getPollErrors(poll)) | |
8 | 8 | |
9 | 9 | server.publish(poll, cb) |
10 | 10 | } |
11 | 11 | } |
Built with git-ssb-web