Fixed a route issue

This commit is contained in:
ram33 2017-09-11 20:56:17 +05:30
parent acc7de967f
commit 07f73a05cb
2 changed files with 3 additions and 2 deletions

View File

@ -136,8 +136,9 @@ function mountSwagger(loopbackApplication, swaggerApp, opts) {
return key.indexOf('/' + req.query.model) === 0;
});
res.status(200).send(filteredSwaggerObject);
} else {
res.status(200).send(swaggerObject);
}
res.status(200).send(swaggerObject);
});
}

View File

@ -34,7 +34,7 @@ $(function() {
var methodOrder = ['get', 'head', 'options', 'put', 'post', 'delete'];
var url = config.url || '/swagger/resources';
if (GetParameterValues('model')) {
url += '?model=' + GetParameterValues('model');
url += url.indexOf('?') > 0 ? '&' : '?' + 'model=' + GetParameterValues('model');
}
/* eslint-disable camelcase */
window.swaggerUi = new SwaggerUi({