summaryrefslogtreecommitdiff
path: root/app/node_modules/okdb/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/node_modules/okdb/index.js')
-rw-r--r--app/node_modules/okdb/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/node_modules/okdb/index.js b/app/node_modules/okdb/index.js
index 3089411..5368e4a 100644
--- a/app/node_modules/okdb/index.js
+++ b/app/node_modules/okdb/index.js
@@ -72,8 +72,13 @@ FSDB.prototype.put = function(collection, query, data) {
}
};
-FSDB.prototype.create = function(collection, id, data) {
- throw new Error('Not implemented!');
+FSDB.prototype.create = function(collection, data) {
+ var created = this._db(collection)
+ .chain()
+ .push(data)
+ .last()
+ .value();
+ return this._resolve(created);
};
FSDB.prototype.remove = function(collection, id, data) {