Skip to content

Commit 06c49d4

Browse files
author
Umed Khudoiberdiev
committed
fixed bug with undefined result code behaviour
1 parent 40a3aac commit 06c49d4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "routing-controllers",
33
"private": true,
4-
"version": "0.7.4",
4+
"version": "0.7.5",
55
"description": "Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.",
66
"license": "MIT",
77
"readmeFilename": "README.md",

src/driver/express/ExpressDriver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class ExpressDriver extends BaseDriver {
300300
else if (result === undefined) { // throw NotFoundError on undefined response
301301

302302
if (action.undefinedResultCode) {
303-
options.response.httpCode = action.undefinedResultCode;
303+
options.response.status(action.undefinedResultCode);
304304

305305
if (action.isJsonTyped) {
306306
options.response.json();

src/driver/koa/KoaDriver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class KoaDriver extends BaseDriver {
250250
}
251251
else if (result === undefined) { // throw NotFoundError on undefined response
252252
if (action.undefinedResultCode) {
253-
options.response.httpCode = action.undefinedResultCode;
253+
options.response.status = action.undefinedResultCode;
254254

255255
if (action.isJsonTyped) {
256256
options.response.json();

0 commit comments

Comments
 (0)