9d6f62b4a3
add config file with BASE_DN, add async wrapper class for ldap client, implement addUser getUser delUser, add and implement addGroup delGroup methods
12 lines
223 B
JavaScript
12 lines
223 B
JavaScript
import { readFileSync } from "fs";
|
|
import { exit } from "process";
|
|
export default (path) => {
|
|
try {
|
|
return JSON.parse(readFileSync(path));
|
|
}
|
|
catch (e) {
|
|
console.log(`Error: ${path} was not found.`);
|
|
exit(1);
|
|
}
|
|
};
|