alphascript-server
Version:
CRUD operations for mongo and other functionalities to get started quickly in any CMS project
21 lines (17 loc) • 491 B
JavaScript
var api = require('../../../');
var moment = require('moment');
module.exports = {
get: function(req, res) {
//todo
res.status(404).send("SQL graphs not implemented");
},
custom: function(graphKey) {
return function(req, res) {
var graph = api.graphMap[graphKey];
graph.get(req, function(err, data) {
if (err) return res.status(500).send(err);
res.json(data);
});
};
}
};