From 023391534a4d4a6a15d490af53cc0a0929ce61b5 Mon Sep 17 00:00:00 2001 From: ManifoldFR <wilson.jallet@gmail.com> Date: Fri, 31 Aug 2018 15:01:15 +0200 Subject: [PATCH] small syntax changes --- src/graphql/authenticator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphql/authenticator.js b/src/graphql/authenticator.js index 7b36a2e..a965f9f 100644 --- a/src/graphql/authenticator.js +++ b/src/graphql/authenticator.js @@ -9,7 +9,7 @@ const SECRET_KEY = "boom shakalaka"; // against the LDAP using passportjs // The promise will fail if no user is returned in the passport.authenticate // callback. -function loginResolverFunc({ username, password, req }) { +const loginResolverFunc = ({ username, password, req }) => { return new Promise((resolve, reject) => { passport.authenticate('ldapauth', (err, user, info) => { if (err) { reject(err); } @@ -20,6 +20,6 @@ function loginResolverFunc({ username, password, req }) { resolve(token); })({ body: { username, password } }); }); -} +}; export default loginResolverFunc; \ No newline at end of file -- GitLab