module.exports = function(client, callback) {
callback({ field: "value" });
}
module.exports = { guests:true, logged:true, http:true, virtual:true };
module.exports = function(client, callback) {
var num = path.basename(client.path);
dbCity.buildings.findOne({ num: num }, function(err, building) {
callback({ success: !err, building: building });
});
}
{
"success": true,
"building": {
"_id": "53f669b438823d2c21000001",
"caption": "text",
"num": "1"
}
}
module.exports = function(client, callback) {
var num = path.basename(client.path);
dbCity.buildings.update(
{ num: num },
JSON.parse(client.fields.building),
function(err) {
callback({ success: !err });
}
);
}