Comparing version 0.1.0-beta-13 to 0.1.0-beta-14
@@ -23,2 +23,13 @@ "use strict"; | ||
* @author Igor Ivanovic | ||
* @method Controller#setStatusCode | ||
* | ||
* @description | ||
* Set status code | ||
*/ | ||
setStatusCode: function Controller_setStatusCode(code) { | ||
this._request.setStatusCode(code); | ||
}, | ||
/** | ||
* @since 0.0.1 | ||
* @author Igor Ivanovic | ||
* @method Controller#stopChain | ||
@@ -25,0 +36,0 @@ * |
@@ -108,5 +108,20 @@ "use strict"; | ||
}, | ||
/** | ||
* @since 0.0.1 | ||
* @author Igor Ivanovic | ||
* @method Request#setStatusCode | ||
* | ||
* @description | ||
* HTTP status code | ||
*/ | ||
setStatusCode: function Request_setStatusCode(code) { | ||
if (!Type.isNumber(code)) { | ||
throw new error.HttpError(500, {code: code}, "Status code must be number type"); | ||
} | ||
this.statusCode = code; | ||
}, | ||
/** | ||
* @since 0.0.1 | ||
* @author Igor Ivanovic | ||
* @method Request#stopPromiseChain | ||
@@ -401,2 +416,3 @@ * | ||
stopPromiseChain: this.stopPromiseChain.bind(this), | ||
setStatusCode: this.setStatusCode.bind(this), | ||
createUrl: router.createUrl.bind(router), | ||
@@ -403,0 +419,0 @@ parsedUrl: core.copy(this.parsedUrl) |
@@ -29,3 +29,3 @@ "use strict"; | ||
"isHeaderCacheUnModified", "sendNoChange", "getParsedUrl", | ||
"stopChain", "render", "renderFile" | ||
"stopChain", "render", "renderFile", "setStatusCode" | ||
].forEach(function (method) { | ||
@@ -32,0 +32,0 @@ if (!(method in this)) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Powerful lightweight mvc framework for nodejs", | ||
"version": "0.1.0-beta-13", | ||
"version": "0.1.0-beta-14", | ||
"dependencies" : { | ||
@@ -8,0 +8,0 @@ "mongoose": "3.8.x", |
109199
3478