var utils = require('./utils');
var mongoose = require('mongoose');
var Loc = mongoose.model('Location');

module.exports.locationsListByDistance = function(req, res) {
    utils.sendJsonResponse(res, 200, {
        "status": "success"
    });
};

module.exports.locationsCreate = function(req, res) {
    utils.sendJsonResponse(res, 200, {
        "status": "sucess"
    });
};

module.exports.locationsReadOne = function(req, res) {
    if (req.params && req.params.locationid) {
        Loc.findById(req.params.locationid).exec(function(err, location) {
            if (!location){
                utils.sendJsonResponse(res, 404, {
                    "message": "locationid not found"
                });
                return;
            }else if (err){
                utils.sendJsonResponse(res, 404, err);
                return;
            }
            utils.sendJsonResponse(res, 200, location);
        });
    } else {
        utils.sendJsonResponse(res, 404, {
            "message": "No locationid is request"
        });
    }
};

module.exports.locationsUpdateOne = function(req, res) {
    utils.sendJsonResponse(res, 200, {
        "status": "sucess"
    });
};

module.exports.locationsDeleteOne = function(req, res) {
    utils.sendJsonResponse(res, 200, {
        "status": "sucess"
    });
};

@@ -576,16 +576,17 @@
 ocation)
+ 
 %7B%0A      
@@ -741,16 +741,17 @@
        %7D
+ 
 else if 
@@ -755,16 +755,17 @@
 if (err)
+ 
 %7B%0A      

Update locations.js