1
0
Fork 0

Yak shave

This commit is contained in:
Alan Plum 2016-02-03 17:28:25 +01:00
parent 22a8b5ec65
commit dcc2101d09
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
1 changed files with 2 additions and 6 deletions

View File

@ -169,16 +169,12 @@ module.exports = exports = class SwaggerContext {
response(status, model, mimes, description) {
let statusCode = Number(status);
if (!status || Number.isNaN(statusCode)) {
description = mimes;
mimes = model;
model = status;
statusCode = 200;
}
if (model === null && statusCode === 200) {
this._responses.delete(200);
statusCode = 204;
statusCode = model === null ? 204 : 200;
}
if (