Updates
This commit is contained in:
@@ -27,7 +27,7 @@ const defaultMariadbUserHost = process.env.DSQL_DB_HOST || "127.0.0.1";
|
||||
*/
|
||||
function refreshUsersAndGrants(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ userId, mariadbUserHost, mariadbUsername, sqlUserID, }) {
|
||||
var _b, _c, _d, _e;
|
||||
var _b, _c, _d, _e, _f;
|
||||
const mariadbUsers = (yield (0, dbHandler_1.default)({
|
||||
query: `SELECT * FROM mariadb_users`,
|
||||
}));
|
||||
@@ -190,7 +190,7 @@ function refreshUsersAndGrants(_a) {
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log(`Error in adding SQL user =>`, error.message);
|
||||
(_f = global.ERROR_CALLBACK) === null || _f === void 0 ? void 0 : _f.call(global, `Error Refreshing MariaDB Users and Grants`, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@ const encrypt_1 = __importDefault(require("../../functions/dsql/encrypt"));
|
||||
*/
|
||||
function resetSQLCredentialsPasswords() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a;
|
||||
const users = (yield (0, dbHandler_1.default)({
|
||||
query: `SELECT * FROM users`,
|
||||
}));
|
||||
@@ -61,7 +62,7 @@ function resetSQLCredentialsPasswords() {
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log(`Error Updating User ${user.id} Password =>`, error.message);
|
||||
(_a = global.ERROR_CALLBACK) === null || _a === void 0 ? void 0 : _a.call(global, `Error Resetting MariaDB User Password`, error);
|
||||
}
|
||||
}
|
||||
process.exit();
|
||||
|
||||
@@ -28,6 +28,7 @@ const tmpDir = process.argv[process.argv.length - 1];
|
||||
*/
|
||||
function createUser() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a;
|
||||
/**
|
||||
* Validate Form
|
||||
*
|
||||
@@ -126,7 +127,7 @@ function createUser() {
|
||||
return true;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(`Error in creating user => ${error.message}`);
|
||||
(_a = global.ERROR_CALLBACK) === null || _a === void 0 ? void 0 : _a.call(global, `Error Creating User`, error);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,6 +24,7 @@ const tmpDir = process.argv[process.argv.length - 1];
|
||||
*/
|
||||
function createUser() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a;
|
||||
/**
|
||||
* Validate Form
|
||||
*
|
||||
@@ -65,7 +66,7 @@ function createUser() {
|
||||
return true;
|
||||
}
|
||||
catch (error) {
|
||||
console.log(`Error in creating user => ${error.message}`);
|
||||
(_a = global.ERROR_CALLBACK) === null || _a === void 0 ? void 0 : _a.call(global, `Error Updating User`, error);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user