Merge branch 'develop' of github.com:ether/etherpad-lite into store-sessions-in-db

This commit is contained in:
John McLear 2013-02-17 23:44:26 +00:00
commit 6d7e709ecb
14 changed files with 104 additions and 14 deletions

View file

@ -216,6 +216,9 @@ var version =
}
};
// set the latest available API version here
exports.latestApiVersion = '1.2.7';
/**
* Handles a HTTP API call
* @param functionName the name of the called function

View file

@ -1429,7 +1429,7 @@ function composePadChangesets(padId, startNum, endNum, callback)
*/
exports.padUsersCount = function (padID, callback) {
callback(null, {
padUsersCount: socketio.sockets.clients(padId).length
padUsersCount: socketio.sockets.clients(padID).length
});
}

View file

@ -57,4 +57,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
res.end("OK");
});
});
//Provide a possibility to query the latest available API version
args.app.get('/api', function (req, res) {
res.json({"currentVersion" : apiHandler.latestApiVersion});
});
}