git ssb

3+

ev / sdash



Commit 9ee51f2b87423b4fe12401dc8ecb9f21a5965aea

add user posts to their profile page gold star

Gwen committed on 9/3/2016, 5:17:00 AM
Parent: e0a6ca5dfb54b357d64d5b3e6aa2ca7a4dcc61b3

Files changed

index.jschanged
layouts/profile.jadechanged
index.jsView
@@ -30,8 +30,15 @@
3030 if (err) {
3131 throw err;
3232 }
3333 key = req.params.key;
34 + pull(
35 + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'post'}}}}], limit: 1, reverse: true}),
36 + pull.drain(function (data) {
37 + post = data;
38 + console.log(data)
39 + })
40 + )
3441 res.render('profile', {avatar, bloburl, key});
3542 })
3643 })
3744 });
layouts/profile.jadeView
@@ -3,4 +3,5 @@
33 block content
44 div.message
55 a(href='/#{key}'): img(src='http://localhost:8989/blobs/get/#{avatar.image}' style='width: 5em; float: left; margin-right: 1em;' class='profile')
66 p <strong>Name:</strong> <a href='/#{key}'>@#{avatar.name}</a><br /><strong>Pubkey:</strong> #{key}
7 + p= post.value.content.text

Built with git-ssb-web