Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Edited documentation and coding style

  • Loading branch information...
commit 3c2304f4a205a2b993ecf18c1651bcd080f9a957 1 parent f1f9311
@samluescher samluescher authored
View
3  .gitignore
@@ -36,7 +36,4 @@ Thumbs.db
node_modules/*
node_modules/.bin/express
-
-node_modules/.bin/express
-
config-prod.js
View
8 api/map.js
@@ -14,7 +14,7 @@ var Point = models.Point,
var MapAPI = function(app) {
- //Returns all unique maps
+ // Returns a list of maps
app.get('/api/maps(\/latest|\/featured)' , function(req, res){
var query = {status: config.MapStatus.PUBLIC};
var options = {};
@@ -80,7 +80,7 @@ var MapAPI = function(app) {
return m;
}
- //Returns a specific unique map by publicslug
+ //Returns a specific map by publicslug
app.get('/api/map/:publicslug', function(req, res){
Map.findOne({publicslug: req.params.publicslug})
.populate('layers.pointCollection')
@@ -93,7 +93,7 @@ var MapAPI = function(app) {
});
});
- //Returns a specific unique map by adminslug, and sets its admin state to true for current
+ //Returns a specific map by adminslug, and sets its admin state to true for current
//session
app.get('/api/map/admin/:adminslug', function(req, res) {
Map.findOne({adminslug: req.params.adminslug})
@@ -109,7 +109,7 @@ var MapAPI = function(app) {
});
});
- //Create a new map
+ //Creates and returns a new map
app.post('/api/map', function(req, res)
{
if (!permissions.canCreateMap(req)) {
View
4 models.js
@@ -3,7 +3,7 @@ var mongoose = require('mongoose'),
mongooseTypes = require("mongoose-types");
mongooseTypes.loadTypes(mongoose);
-useTimestamps = mongooseTypes.useTimestamps
+useTimestamps = mongooseTypes.useTimestamps;
this.User = mongoose.model('User', new mongoose.Schema({
name: String,
@@ -150,7 +150,7 @@ this.Map = mongoose.model('Map', new mongoose.Schema({
this.Map.schema.plugin(useTimestamps);
/*
-Adjusts minVal, maxVal and color positions for all layers if there are if
+Adjusts minVal, maxVal and color positions for all layers if
absPosition is defined for any color.
This allows us to have colors with relative (normalized) positions between
View
7 template/email/urls.txt
@@ -2,11 +2,12 @@ Hello,
You'll be able to access your map from the following URLs.
- ADMIN -- keep this link private:
+ ADMIN URL -- keep this link private:
%(adminUrl)s
- PUBLIC -- share this link with others:
+ PUBLIC URL -- share this link with others:
%(publicUrl)s
Best,
-The GeoSense email robot
+
+ The GeoSense email robot
View
2  utils.js
@@ -88,7 +88,7 @@ exports.import = function(into, mod) {
// TODO: Due to a mongodb bug, counting is really slow even if there is
// an index: https://jira.mongodb.org/browse/SERVER-1752
-// To address this we currently cache the count as long for
+// To address this we currently cache the count for as long
// as the server is running, but mongodb 2.3 should fix this issue.
var COUNT_CACHE = {};
exports.modelCount = function(model, query, callback) {
Please sign in to comment.
Something went wrong with that request. Please try again.