Updates
This commit is contained in:
+3
-3
@@ -103,7 +103,7 @@ function queryDSQLAPI(_a) {
|
||||
response.on("error", (err) => {
|
||||
resolve({
|
||||
success: false,
|
||||
payload: undefined,
|
||||
singleRes: undefined,
|
||||
msg: `An error occurred on the response`,
|
||||
error: err.message,
|
||||
errorData: { requestOptions, grabedHostNames },
|
||||
@@ -113,7 +113,7 @@ function queryDSQLAPI(_a) {
|
||||
httpsRequest.on("error", (err) => {
|
||||
resolve({
|
||||
success: false,
|
||||
payload: undefined,
|
||||
singleRes: undefined,
|
||||
msg: `An error occurred while making the request`,
|
||||
error: err.message,
|
||||
errorData: {
|
||||
@@ -132,7 +132,7 @@ function queryDSQLAPI(_a) {
|
||||
catch (error) {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
singleRes: undefined,
|
||||
msg: `Request Failed`,
|
||||
error: error.message,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { APIGetUserFunctionParams, GetUserFunctionReturn } from "../../../types";
|
||||
import { APIGetUserFunctionParams, APIResponseObject } from "../../../types";
|
||||
/**
|
||||
* # API Get User
|
||||
*/
|
||||
export default function apiGetUser({ fields, database, userId, dbUserId, selectAll, }: APIGetUserFunctionParams): Promise<GetUserFunctionReturn>;
|
||||
export default function apiGetUser({ fields, database, userId, dbUserId, selectAll, }: APIGetUserFunctionParams): Promise<APIResponseObject>;
|
||||
|
||||
+4
-4
@@ -55,7 +55,7 @@ function addDbEntry(_a) {
|
||||
if ((duplicateValue === null || duplicateValue === void 0 ? void 0 : duplicateValue[0]) && !update) {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "Duplicate entry found",
|
||||
};
|
||||
}
|
||||
@@ -151,7 +151,7 @@ function addDbEntry(_a) {
|
||||
});
|
||||
return {
|
||||
success: Boolean(newInsert === null || newInsert === void 0 ? void 0 : newInsert.insertId),
|
||||
payload: newInsert,
|
||||
postInsertReturn: newInsert,
|
||||
queryObject: {
|
||||
sql: query,
|
||||
params: finalQueryValues,
|
||||
@@ -190,7 +190,7 @@ function addDbEntry(_a) {
|
||||
}
|
||||
return {
|
||||
success: Boolean(newInsert === null || newInsert === void 0 ? void 0 : newInsert.insertId),
|
||||
payload: newInsert,
|
||||
postInsertReturn: newInsert,
|
||||
queryObject: {
|
||||
sql: (0, sql_formatter_1.format)(query),
|
||||
params: finalQueryValues,
|
||||
@@ -200,7 +200,7 @@ function addDbEntry(_a) {
|
||||
else {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "No data provided",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ function updateDbEntry(_a) {
|
||||
if (!data || !Object.keys(data).length) {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "No data provided",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user