summaryrefslogtreecommitdiff
path: root/bucky/app
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app')
-rw-r--r--bucky/app/bucky.js5
-rw-r--r--bucky/app/federate.js6
2 files changed, 3 insertions, 8 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js
index 20bb2e5..1f90111 100644
--- a/bucky/app/bucky.js
+++ b/bucky/app/bucky.js
@@ -148,11 +148,6 @@ var bucky = module.exports = {
if (! keyword) return next()
db.getKeyword(keyword).then(function(keyword){
res.keyword = keyword
- if (keyword) {
- keyword.set("threads", keyword.get("threads").toString())
- keyword.set("ops", keyword.get("ops").toString())
- keyword.set("display", (keyword.get("display") || '').toString())
- }
next()
})
},
diff --git a/bucky/app/federate.js b/bucky/app/federate.js
index d4ce3e6..51b34f6 100644
--- a/bucky/app/federate.js
+++ b/bucky/app/federate.js
@@ -29,7 +29,7 @@ module.exports = {
console.log('export keyword', req.params.keyword)
db.getKeyword(req.params.keyword).then(keyword => {
send("keyword", keyword)
- return db.getThreadsForKeyword(keyword)
+ return db.getThreadsForKeyword(req.params.keyword)
}).then(threads => {
var promises = threads.map(thread => {
exportThread({ params: { id: thread.get('id') } }, res, function(){})
@@ -44,7 +44,7 @@ module.exports = {
return db.getThread(req.params.id).then(thread => {
return send("thread", thread)
}).then(json => {
- thread_id = json.id
+ thread_id = json.el.id
console.log('got thread id', thread_id)
return db.getCommentsForThread(req.params.id)
}).then(comments => {
@@ -71,7 +71,7 @@ module.exports = {
function send(type, data){
console.log('sending', type, data.get('id'))
var json = data.toJSON()
- fetch("https://bucky.asdf.us/raw/import/" + type, {
+ return fetch("https://bucky.asdf.us/raw/import/" + type, {
method: 'PUT',
body: JSON.stringify(json),
headers: {