Updates
This commit is contained in:
@@ -34,7 +34,6 @@ export default async function apiPost({
|
||||
return { success: false, msg: "Wrong Input" };
|
||||
}
|
||||
|
||||
/** @type {any} */
|
||||
let results: any;
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,6 @@ export default async function apiDeleteUser({
|
||||
|
||||
const deleteUser = await deleteDbEntry({
|
||||
dbContext: "Dsql User",
|
||||
paradigm: "Full Access",
|
||||
dbFullName,
|
||||
tableName: "users",
|
||||
identifierColumnName: "id",
|
||||
|
||||
@@ -81,7 +81,6 @@ export default async function apiUpdateUser({
|
||||
|
||||
const updateUser = await updateDbEntry({
|
||||
dbContext: "Dsql User",
|
||||
paradigm: "Full Access",
|
||||
dbFullName,
|
||||
tableName: "users",
|
||||
identifierColumnName: "id",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fs from "fs";
|
||||
import serverError from "./serverError";
|
||||
import mysql from "serverless-mysql";
|
||||
import grabDSQLConnection from "../../utils/grab-dsql-connection";
|
||||
import path from "path";
|
||||
|
||||
/**
|
||||
* # Main DB Handler Function
|
||||
@@ -37,8 +37,12 @@ export default async function dbHandler(...args: any[]) {
|
||||
);
|
||||
});
|
||||
} catch (error: any) {
|
||||
const tmpFolder = path.resolve(process.cwd(), "./.tmp");
|
||||
if (!fs.existsSync(tmpFolder))
|
||||
fs.mkdirSync(tmpFolder, { recursive: true });
|
||||
|
||||
fs.appendFileSync(
|
||||
"./.tmp/dbErrorLogs.txt",
|
||||
path.resolve(tmpFolder, "./dbErrorLogs.txt"),
|
||||
JSON.stringify(error, null, 4) + "\n" + Date() + "\n\n\n",
|
||||
"utf8"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user