summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-12-15 08:13:12 +0100
committerJules Laplace <julescarbon@gmail.com>2017-12-15 08:13:12 +0100
commit0767045a3b210ee65a4c8c90b5dc42a6e54e0d1f (patch)
treea1e35960fc3eea7c0e67a26ca52481097ecdd4cd
parentfe69052c4b6f180739b713d4c2ef495c3efc4bf2 (diff)
nomo tostring
-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: {