git ssb

0+

Piet / ssb-loomio



Commit 3cbada945feb3478fdc1fe814b9eb9edaab26763

Use schema version string from ssb-poll-schema

Piet Geursen committed on 3/16/2018, 2:35:05 AM
Parent: 14e118e9daffeaae72c39c493c18827986a23ee6

Files changed

package-lock.jsonchanged
package.jsonchanged
poll/sync/poll.jschanged
position/async/position.jschanged
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 193125 bytes
New file size: 193125 bytes
package.jsonView
@@ -36,8 +36,8 @@
3636 "lodash.clonedeep": "^4.5.0",
3737 "mutant": "^3.22.1",
3838 "pull-stream": "^3.6.2",
3939 "ssb-msg-schemas": "^6.3.0",
40- "ssb-poll-schema": "^1.0.3",
40+ "ssb-poll-schema": "^1.1.0",
4141 "ssb-ref": "^2.9.0"
4242 }
4343 }
poll/sync/poll.jsView
@@ -1,9 +1,9 @@
11 // var { link } = require('ssb-msg-schemas/util')
2-const {SCHEMA_VERSION} = require('../../types')
2+const {versionStrings: {V1_SCHEMA_VERSION_STRING}} = require('ssb-poll-schema')
33
44 function Poll ({ details, title, closesAt, body, channel, recps, mentions }) {
5- var content = { type: 'poll', details, title, closesAt, version: SCHEMA_VERSION }
5+ var content = { type: 'poll', details, title, closesAt, version: V1_SCHEMA_VERSION_STRING }
66
77 if (body) content.body = body
88
99 // if (root) {
position/async/position.jsView
@@ -1,8 +1,8 @@
11 const sort = require('ssb-sort')
22
33 const GetPoll = require('../../poll/async/get')
4-const {SCHEMA_VERSION} = require('../../types')
4+const {versionStrings: {V1_SCHEMA_VERSION_STRING}} = require('ssb-poll-schema')
55 // var { link } = require('ssb-msg-schemas/util')
66 //
77
88 module.exports = function (server) {
@@ -10,9 +10,9 @@
1010
1111 return function Position ({ poll = {}, details, reason, channel, mentions }, cb) {
1212 const content = {
1313 type: 'position',
14- version: SCHEMA_VERSION,
14+ version: V1_SCHEMA_VERSION_STRING,
1515 root: typeof poll === 'string' ? poll : poll.key,
1616 details
1717 }
1818

Built with git-ssb-web