Updates
This commit is contained in:
+3
-1
@@ -20,7 +20,7 @@ const addDbEntry_1 = __importDefault(require("../../functions/backend/db/addDbEn
|
||||
const updateDbEntry_1 = __importDefault(require("../../functions/backend/db/updateDbEntry"));
|
||||
function dsqlCrud(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { action, data, table, targetValue, sanitize, targetField, targetId, dbFullName, deleteData, batchData, deleteKeyValues, } = params;
|
||||
const { action, data, table, targetValue, sanitize, targetField, targetId, dbFullName, deleteData, batchData, deleteKeyValues, debug, } = params;
|
||||
const finalData = (sanitize ? sanitize({ data }) : data);
|
||||
const finalBatchData = (sanitize ? sanitize({ batchData }) : batchData);
|
||||
const DB_CONN = global.DSQL_READ_ONLY_DB_CONN || global.DSQL_DB_CONN;
|
||||
@@ -35,6 +35,7 @@ function dsqlCrud(params) {
|
||||
batchData: finalBatchData,
|
||||
tableName: table,
|
||||
dbFullName,
|
||||
debug,
|
||||
});
|
||||
return INSERT_RESULT;
|
||||
case "update":
|
||||
@@ -45,6 +46,7 @@ function dsqlCrud(params) {
|
||||
dbFullName,
|
||||
identifierColumnName: (targetField || "id"),
|
||||
identifierValue: String(targetValue || targetId),
|
||||
debug,
|
||||
});
|
||||
return UPDATE_RESULT;
|
||||
case "delete":
|
||||
|
||||
+9
-6
@@ -14,10 +14,13 @@ function setupGlobalNetwork() {
|
||||
(0, child_process_1.execSync)(`docker network rm ${globalNetworkName}`, {});
|
||||
}
|
||||
catch (error) { }
|
||||
let newNtwkCmd = `docker network create`;
|
||||
newNtwkCmd += ` --driver bridge`;
|
||||
newNtwkCmd += ` --subnet ${globalIPPrefix}.0/24`;
|
||||
newNtwkCmd += ` --gateway ${globalIPPrefix}.1`;
|
||||
newNtwkCmd += ` ${globalNetworkName}`;
|
||||
(0, child_process_1.execSync)(newNtwkCmd);
|
||||
try {
|
||||
let newNtwkCmd = `docker network create`;
|
||||
newNtwkCmd += ` --driver bridge`;
|
||||
newNtwkCmd += ` --subnet ${globalIPPrefix}.0/24`;
|
||||
newNtwkCmd += ` --gateway ${globalIPPrefix}.1`;
|
||||
newNtwkCmd += ` ${globalNetworkName}`;
|
||||
(0, child_process_1.execSync)(newNtwkCmd);
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user