Skip to content

Commit

Permalink
Edited documentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
samluescher committed Jul 9, 2012
1 parent f1f9311 commit 3c2304f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Expand Up @@ -36,7 +36,4 @@ Thumbs.db

node_modules/*
node_modules/.bin/express

node_modules/.bin/express

config-prod.js
8 changes: 4 additions & 4 deletions api/map.js
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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')
Expand All @@ -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})
Expand All @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions models.js
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions template/email/urls.txt
Expand Up @@ -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
2 changes: 1 addition & 1 deletion utils.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 3c2304f

Please sign in to comment.