From 5cec6fbd9b13cfc9b08eb3d94c75191b66c6197e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chiciuc=20Nicu=C8=99or?= Date: Wed, 1 Dec 2021 23:38:10 +0200 Subject: [PATCH] Replace user with ctx.user in param docs (#136) --- lib/layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/layer.js b/lib/layer.js index 02724e3..5ec0ce8 100644 --- a/lib/layer.js +++ b/lib/layer.js @@ -159,7 +159,7 @@ Layer.prototype.url = function (params, options) { * router * .param('user', function (id, ctx, next) { * ctx.user = users[id]; - * if (!user) return ctx.status = 404; + * if (!ctx.user) return ctx.status = 404; * next(); * }) * .get('/users/:user', function (ctx, next) {