diff --git a/src/graphql/authenticator.js b/src/graphql/authenticator.js index 7b36a2e22b3932184658f2c12da65c4efdbc0371..a965f9f0765e31b1c322e3a7321df450048112e1 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