This commit is contained in:
Benjamin Toby
2025-01-25 14:20:25 +01:00
parent 1db9c3a2e7
commit e82bcd0824
91 changed files with 936 additions and 324 deletions
+5 -4
View File
@@ -1,8 +1,5 @@
import fs from "fs";
import path from "path";
import mysql from "serverless-mysql";
import grabDbSSL from "../../utils/backend/grabDbSSL";
import grabDSQLConnection from "../../utils/grab-dsql-connection";
type Param = {
@@ -37,8 +34,12 @@ export default async function dbHandler({
console.log(error);
console.log(CONNECTION.config());
const tmpFolder = path.resolve(process.cwd(), "./.tmp");
if (!fs.existsSync(tmpFolder))
fs.mkdirSync(tmpFolder, { recursive: true });
fs.appendFileSync(
path.resolve(__dirname, "../.tmp/dbErrorLogs.txt"),
path.resolve(tmpFolder, "./dbErrorLogs.txt"),
JSON.stringify(error, null, 4) + "\n" + Date() + "\n\n\n",
"utf8"
);