From 37d11e888cb4754f9c543352860d93d0f067de34 Mon Sep 17 00:00:00 2001 From: jkaplon Date: Tue, 31 May 2016 17:03:01 -0400 Subject: [PATCH] Remove db folder from repo before anything sensitive gets added in there; closes issue #4. --- .gitignore | 1 + db/index.js | 1 - db/users.js | 27 --------------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 db/index.js delete mode 100644 db/users.js diff --git a/.gitignore b/.gitignore index 9c9683f..8ef4db6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/db/* /assets/* /CodeMirror/* /codemirror/* diff --git a/db/index.js b/db/index.js deleted file mode 100644 index 498a88c..0000000 --- a/db/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.users = require('./users'); diff --git a/db/users.js b/db/users.js deleted file mode 100644 index c842660..0000000 --- a/db/users.js +++ /dev/null @@ -1,27 +0,0 @@ -var records = [ - { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] } - , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] } -]; - -exports.findById = function(id, cb) { - process.nextTick(function() { - var idx = id - 1; - if (records[idx]) { - cb(null, records[idx]); - } else { - cb(new Error('User ' + id + ' does not exist')); - } - }); -} - -exports.findByUsername = function(username, cb) { - process.nextTick(function() { - for (var i = 0, len = records.length; i < len; i++) { - var record = records[i]; - if (record.username === username) { - return cb(null, record); - } - } - return cb(null, null); - }); -}