This commit is contained in:
Benjamin Toby
2025-02-05 19:34:03 +01:00
parent 1acdad97a2
commit 06de31dcb2
10 changed files with 23 additions and 15 deletions
@@ -1,4 +1,4 @@
import fs, { glob } from "fs";
import fs from "fs";
import handleNodemailer from "../../backend/handleNodemailer";
import path from "path";
import addMariadbUser from "../../backend/addMariadbUser";
@@ -73,7 +73,6 @@ export default function sqlGenerator<
sqlSearhValues.push(valueParsed);
}
} else if (Array.isArray(queryObj.value)) {
/** @type {string[]} */
const strArray: string[] = [];
queryObj.value.forEach((val) => {
const valueParsed = val;
@@ -97,15 +96,11 @@ export default function sqlGenerator<
}
const sqlSearhString = queryKeys?.map((field) => {
const queryObj =
/** @type {import("../../../types").ServerQueryQueryObject} */ finalQuery?.[
field
];
const queryObj = finalQuery?.[field];
if (!queryObj) return;
if (queryObj.__query) {
const subQueryGroup =
/** @type {import("../../../types").ServerQueryQueryObject}} */ queryObj.__query;
const subQueryGroup = queryObj.__query;
const subSearchKeys = Object.keys(subQueryGroup);
const subSearchString = subSearchKeys.map((_field) => {