diff options
| author | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-23 18:36:36 +0000 |
|---|---|---|
| committer | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-23 18:36:36 +0000 |
| commit | 0380ba5ea5c134f3b7c79efae4daa1034d405daf (patch) | |
| tree | 63c8b95e5b88738c7562b2c22766f7c90f01778e /web/models/mockpoints.js | |
| parent | 8808175e3aa8ffc4022e58c9f926abfd28ce62c4 (diff) | |
| parent | 8135fe42bfa36df72c427e8d567aad2182e14372 (diff) | |
Merge branch 'master' into qa
Diffstat (limited to 'web/models/mockpoints.js')
| -rw-r--r-- | web/models/mockpoints.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/web/models/mockpoints.js b/web/models/mockpoints.js index 51bd422..05e9f18 100644 --- a/web/models/mockpoints.js +++ b/web/models/mockpoints.js @@ -3,15 +3,15 @@ var mongoose = require('mongoose'); // Mongoose Schema definition var Schema = mongoose.Schema; var dumbJsonSchema = new Schema({ - type: String, - coordinates: Array, - gender: String, - age: String, - race: String, - longhair: Boolean, - longbeard: Boolean, - extra: String, - status: String + type: String, + coordinates: Array, + gender: String, + age: String, + race: String, + longhair: Boolean, + longbeard: Boolean, + extra: String, + status: String }); // Mongoose Model definition @@ -20,16 +20,16 @@ var dumbJson = mongoose.model('dumbJstring', dumbJsonSchema, 'dumbpointscollecti // this function gets ALL the points from the db // returns the entire document without modifications exports.get_points = function(callback) { - dumbJson.find({}).exec(function(err, docs) { - if (err) callback(err, null); - callback(null, docs); - }); + dumbJson.find({}).exec(function(err, docs) { + if (err) callback(err, null); + callback(null, docs); + }); } // this function stores A user report into the db exports.save_request = function(data, callback) { - dumbJson.create(data, function(err, result) { - if (err) callback(err, null); - callback(null, result); - }); + dumbJson.create(data, function(err, result) { + if (err) callback(err, null); + callback(null, result); + }); } |
