From d5b73ebe4f4e588873834b92fb23d4b01b8d6f1a Mon Sep 17 00:00:00 2001 From: Teoman Soygul Date: Thu, 16 Apr 2015 15:43:45 +0200 Subject: [PATCH] update doc example to use ctx.state --- docs/api/context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/context.md b/docs/api/context.md index 912afc8..2e6647b 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -126,7 +126,7 @@ koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors. method. ```js -this.assert(this.user, 401, 'User not found. Please login!'); +this.assert(this.state.user, 401, 'User not found. Please login!'); ``` koa uses [http-assert](https://github.com/jshttp/http-assert) for assertions.