Fixed a route issue
This commit is contained in:
parent
acc7de967f
commit
07f73a05cb
3
index.js
3
index.js
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue