2015-12-03 22:00:35 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var version = {
|
|
|
|
cartodb_sql_api: require(__dirname + '/../../package.json').version
|
|
|
|
};
|
|
|
|
|
|
|
|
function VersionController() {
|
|
|
|
}
|
|
|
|
|
2015-12-04 01:43:13 +08:00
|
|
|
VersionController.prototype.route = function (app) {
|
2015-12-03 22:00:35 +08:00
|
|
|
app.get(global.settings.base_url + '/version', this.handleVersion.bind(this));
|
|
|
|
};
|
|
|
|
|
|
|
|
VersionController.prototype.handleVersion = function (req, res) {
|
|
|
|
res.send(version);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = VersionController;
|