Refactor POSTs, add DirectoryPost.

This commit is contained in:
haad
2016-03-10 13:08:04 +01:00
parent b6c355cdbc
commit 7e6d137fe6
6 changed files with 37 additions and 18 deletions

View File

@@ -36,7 +36,7 @@ class Client {
put: (key, data) => this.db.put(channel, password, key, data),
get: (key, options) => {
const items = this._iterator(channel, password, { key: key }).collect();
return items[0] ? items[0].content : null;
return items[0] ? items[0].content : null; // TODO: use KeyValuePost, currently .content is from TextPost
},
close: () => this._pubsub.unsubscribe(channel)
}