Commit 2b1e0cfa2f8ffcddd87d0ea71797a535a1352003
update to work with current patchcore api
Dominic Tarr committed on 12/5/2017, 9:53:35 PMParent: f1d5a7c472bb8e838a7fd395f59be8d473f8a872
Files changed
blogs/blog.js | changed |
blogs/blog.js | ||
---|---|---|
@@ -13,9 +13,9 @@ | ||
13 | 13 | } |
14 | 14 | |
15 | 15 | exports.needs = { |
16 | 16 | message: { html: { markdown: 'first' } }, |
17 | - sbot: { pull: { getBlob: 'first' } } | |
17 | + sbot: { pull: { stream: 'first' } } | |
18 | 18 | } |
19 | 19 | |
20 | 20 | |
21 | 21 | exports.create = function (api) { |
@@ -38,9 +38,11 @@ | ||
38 | 38 | content: function (data) { |
39 | 39 | if('blog' == typeof data.value.content.type) return |
40 | 40 | var div = h('Markdown') |
41 | 41 | pull( |
42 | - api.sbot.pull.getBlob(data.value.content.blog), | |
42 | + api.sbot.pull.stream(function (sbot) { | |
43 | + return sbot.blobs.get(data.value.content.blog) | |
44 | + }), | |
43 | 45 | pull.collect(function (err, ary) { |
44 | 46 | if(err) return |
45 | 47 | var md = api.message.html.markdown({text:Buffer.concat(ary).toString()}) |
46 | 48 | div.innerHTML = md.innerHTML |
@@ -54,4 +56,7 @@ | ||
54 | 56 | } |
55 | 57 | |
56 | 58 | |
57 | 59 | |
60 | + | |
61 | + | |
62 | + |
Built with git-ssb-web