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
View File
@@ -9,7 +9,6 @@ import {
DSQL_DatabaseSchemaType,
GetReqQueryObject,
GetReturn,
ServerQueryParam,
} from "../types";
import apiGetGrabQueryAndValues from "../utils/grab-query-and-values";
@@ -105,6 +105,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "Couldn't Decrypt cookie",
cookieNames: keyNames,
};
}
@@ -127,6 +128,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "No CSRF_K in decrypted payload",
cookieNames: keyNames,
};
}
@@ -135,6 +137,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "Auth file doesn't exist",
cookieNames: keyNames,
};
}
@@ -152,6 +155,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "CSRF_K mismatch",
cookieNames: keyNames,
};
}
}
@@ -166,6 +170,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "Payload Creation Date is not a number",
cookieNames: keyNames,
};
}
@@ -180,6 +185,7 @@ export default function userAuth({
success: false,
payload: null,
msg: "Session has expired",
cookieNames: keyNames,
};
}
@@ -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) => {
+1
View File
@@ -49,6 +49,7 @@ export const TextFieldTypesArray = [
{ title: "HTML", value: "html" },
{ title: "CSS", value: "css" },
{ title: "Javascript", value: "javascript" },
{ title: "Shell", value: "shell" },
] as const;
export type DSQL_FieldSchemaType = {