Commit 3cbada945feb3478fdc1fe814b9eb9edaab26763
Use schema version string from ssb-poll-schema
Piet Geursen committed on 3/16/2018, 2:35:05 AMParent: 14e118e9daffeaae72c39c493c18827986a23ee6
Files changed
package-lock.json | changed |
package.json | changed |
poll/sync/poll.js | changed |
position/async/position.js | changed |
package-lock.json | ||
---|---|---|
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.json | ||
---|---|---|
@@ -36,8 +36,8 @@ | ||
36 | 36 | "lodash.clonedeep": "^4.5.0", |
37 | 37 | "mutant": "^3.22.1", |
38 | 38 | "pull-stream": "^3.6.2", |
39 | 39 | "ssb-msg-schemas": "^6.3.0", |
40 | - "ssb-poll-schema": "^1.0.3", | |
40 | + "ssb-poll-schema": "^1.1.0", | |
41 | 41 | "ssb-ref": "^2.9.0" |
42 | 42 | } |
43 | 43 | } |
poll/sync/poll.js | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 | // var { link } = require('ssb-msg-schemas/util') |
2 | -const {SCHEMA_VERSION} = require('../../types') | |
2 | +const {versionStrings: {V1_SCHEMA_VERSION_STRING}} = require('ssb-poll-schema') | |
3 | 3 | |
4 | 4 | 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 } | |
6 | 6 | |
7 | 7 | if (body) content.body = body |
8 | 8 | |
9 | 9 | // if (root) { |
position/async/position.js | ||
---|---|---|
@@ -1,8 +1,8 @@ | ||
1 | 1 | const sort = require('ssb-sort') |
2 | 2 | |
3 | 3 | const GetPoll = require('../../poll/async/get') |
4 | -const {SCHEMA_VERSION} = require('../../types') | |
4 | +const {versionStrings: {V1_SCHEMA_VERSION_STRING}} = require('ssb-poll-schema') | |
5 | 5 | // var { link } = require('ssb-msg-schemas/util') |
6 | 6 | // |
7 | 7 | |
8 | 8 | module.exports = function (server) { |
@@ -10,9 +10,9 @@ | ||
10 | 10 | |
11 | 11 | return function Position ({ poll = {}, details, reason, channel, mentions }, cb) { |
12 | 12 | const content = { |
13 | 13 | type: 'position', |
14 | - version: SCHEMA_VERSION, | |
14 | + version: V1_SCHEMA_VERSION_STRING, | |
15 | 15 | root: typeof poll === 'string' ? poll : poll.key, |
16 | 16 | details |
17 | 17 | } |
18 | 18 |
Built with git-ssb-web