diff options
Diffstat (limited to 'bucky/app/federate.js')
| -rw-r--r-- | bucky/app/federate.js | 6 |
1 files changed, 3 insertions, 3 deletions
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: { |
