ldap-async
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -199,11 +199,16 @@ "use strict"; | ||
async setAttribute(dn, attribute, value) { | ||
return await new Promise((resolve, reject) => { | ||
this.getClient().then(client => { | ||
const client = await this.getClient(); | ||
try { | ||
return await new Promise((resolve, reject) => { | ||
client.modify(dn, new ldapjs_1.Change({ operation: 'replace', modification: { [attribute]: value } }), err => { | ||
if (err) | ||
reject(err); | ||
resolve(true); | ||
else | ||
resolve(true); | ||
}); | ||
}).catch(reject); | ||
}); | ||
}); | ||
} | ||
finally { | ||
this.release(client); | ||
} | ||
} | ||
@@ -210,0 +215,0 @@ templateLiteralEscape(regex, replacements, strings, values) { |
{ | ||
"name": "ldap-async", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A wrapper around ldapjs to provide promises, pooling, config by environment, and other conveniences.", | ||
@@ -5,0 +5,0 @@ "exports": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22385
320