Skip to content
Snippets Groups Projects
Commit 02339153 authored by Wilson JALLET's avatar Wilson JALLET :money_with_wings:
Browse files

small syntax changes

parent 28cb3349
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ const SECRET_KEY = "boom shakalaka"; ...@@ -9,7 +9,7 @@ const SECRET_KEY = "boom shakalaka";
// against the LDAP using passportjs // against the LDAP using passportjs
// The promise will fail if no user is returned in the passport.authenticate // The promise will fail if no user is returned in the passport.authenticate
// callback. // callback.
function loginResolverFunc({ username, password, req }) { const loginResolverFunc = ({ username, password, req }) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
passport.authenticate('ldapauth', (err, user, info) => { passport.authenticate('ldapauth', (err, user, info) => {
if (err) { reject(err); } if (err) { reject(err); }
...@@ -20,6 +20,6 @@ function loginResolverFunc({ username, password, req }) { ...@@ -20,6 +20,6 @@ function loginResolverFunc({ username, password, req }) {
resolve(token); resolve(token);
})({ body: { username, password } }); })({ body: { username, password } });
}); });
} };
export default loginResolverFunc; export default loginResolverFunc;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment