2015-12-03 22:00:35 +08:00
|
|
|
'use strict';
|
|
|
|
|
2019-10-01 17:11:19 +08:00
|
|
|
const versions = {
|
|
|
|
cartodb_sql_api: require('./../../package.json').version
|
2015-12-03 22:00:35 +08:00
|
|
|
};
|
|
|
|
|
2019-10-01 17:11:19 +08:00
|
|
|
module.exports = class VersionController {
|
2019-10-02 22:02:13 +08:00
|
|
|
route (apiRouter) {
|
|
|
|
apiRouter.get('/version', version());
|
2019-10-01 17:11:19 +08:00
|
|
|
}
|
2015-12-03 22:00:35 +08:00
|
|
|
};
|
|
|
|
|
2019-10-01 17:11:19 +08:00
|
|
|
function version () {
|
|
|
|
return function versionMiddleware (req, res) {
|
|
|
|
res.send(versions);
|
|
|
|
};
|
|
|
|
}
|