Skip to content

Commit

Permalink
chore: fix typos & drop legacy workaround (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjake authored and dead-horse committed Dec 26, 2018
1 parent 077a727 commit 6d848cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -12,7 +12,7 @@ jshint: install
@-./node_modules/.bin/jshint ./

test:
@NODE_ENV=test ./node \
@NODE_ENV=test node \
./node_modules/mocha/bin/_mocha \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
Expand All @@ -22,7 +22,7 @@ test:
$(TESTS)

test-cov:
@NODE_ENV=test ./node \
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
-- -u exports \
--reporter $(REPORTER) \
Expand All @@ -33,7 +33,7 @@ test-cov:
$(TESTS)

test-travis:
@NODE_ENV=test ./node \
@NODE_ENV=test node \
node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha \
--report lcovonly \
-- -u exports \
Expand Down
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -124,7 +124,7 @@ module.exports = function (options) {
ctx.url, ctx.path, options.loginPath, !!ctx.session, loginRequired);

if (!ctx.session) {
debug('ctx.session not exists');
debug('ctx.session does not exist');
// ignore not match path
if (!loginRequired) {
debug('not match needLogin path, %j', ctx.path);
Expand All @@ -142,7 +142,7 @@ module.exports = function (options) {

// get login callback
if (ctx.path === options.loginCallbackPath) {
debug('match login clalback path');
debug('match login callback path');
return loginCallbackHandler(ctx);
}

Expand All @@ -161,7 +161,7 @@ module.exports = function (options) {
if (ctx.session[options.userField]
&& options.loginCheck(ctx)) {
// 4. user logined, next() handler
debug('already logined');
debug('already logged in');
return next();
}

Expand Down
10 changes: 0 additions & 10 deletions node

This file was deleted.

0 comments on commit 6d848cb

Please sign in to comment.