Adds some notes about unsupported endpoints

This commit is contained in:
Raul Ochoa
2016-01-15 17:02:09 +01:00
parent 1eb69ae3d1
commit 3afb7a0eb3
2 changed files with 3 additions and 2 deletions
+2
View File
@@ -69,6 +69,8 @@ LayergroupController.prototype.register = function(app) {
'/static/bbox/:token/:west,:south,:east,:north/:width/:height.:format', cors(), userMiddleware,
this.bbox.bind(this));
// Undocumented/non-supported API endpoint methods.
// Use at your own peril.
app.get(app.base_url_mapconfig +
'/:token/:layer/widget/:widgetName', cors(), userMiddleware,
this.widget.bind(this));
+1 -2
View File
@@ -306,6 +306,7 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la
layergroup.layergroupid = layergroup.layergroupid + ':' + result.lastUpdatedTime;
layergroup.last_updated = new Date(result.lastUpdatedTime).toISOString();
// TODO this should take into account several URL patterns
addWidgetsUrl(username, layergroup);
if (req.method === 'GET') {
@@ -329,8 +330,6 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la
function addWidgetsUrl(username, layergroup) {
// global.environment.serverMetadata
if (layergroup.metadata && Array.isArray(layergroup.metadata.layers)) {
layergroup.metadata.layers = layergroup.metadata.layers.map(function(layer, layerIndex) {
if (layer.widgets) {