From 2156b08e8fa0f79f94d87d0d2d0d6a4dadafdb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 8 Jan 2019 14:20:05 +0100 Subject: [PATCH] Run `yarn run lint --fix` @DakshMiglani check the build server for any errors: https://travis-ci.com/Human-Connection/Nitro-Backend/builds/96505757#L658 Here you can see the build was fine, only eslint complained. Eslint is a quick fix :wink: --- src/jwt/strategy.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/jwt/strategy.js b/src/jwt/strategy.js index d08b7988f..65e2d35c1 100644 --- a/src/jwt/strategy.js +++ b/src/jwt/strategy.js @@ -19,25 +19,25 @@ export default (driver) => { return new Strategy(options, async (JWTPayload, next) => { - const session = driver.session(); + const session = driver.session() const result = await session.run( 'MATCH (user:User {id: $userId}) ' + 'RETURN user {.id, .slug, .name, .avatar, .email, .password, .role} as user LIMIT 1', { userId: JWTPayload.id } - ); - session.close(); + ) + session.close() const [currentUser] = await result.records.map((record) => { - return record.get("user"); - }); + return record.get('user') + }) if (currentUser) { - delete currentUser.password; + delete currentUser.password currentUser.avatar = fixUrl(currentUser.avatar) - return next(null, currentUser); + return next(null, currentUser) } else { - return next(null, false); + return next(null, false) } }) }