Updates
This commit is contained in:
@@ -101,7 +101,7 @@ export default async function addDbEntry<
|
||||
if (duplicateValue?.[0] && !update) {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "Duplicate entry found",
|
||||
};
|
||||
} else if (duplicateValue?.[0] && update) {
|
||||
@@ -222,7 +222,7 @@ export default async function addDbEntry<
|
||||
|
||||
return {
|
||||
success: Boolean(newInsert?.insertId),
|
||||
payload: newInsert,
|
||||
postInsertReturn: newInsert,
|
||||
queryObject: {
|
||||
sql: query,
|
||||
params: finalQueryValues,
|
||||
@@ -275,7 +275,7 @@ export default async function addDbEntry<
|
||||
|
||||
return {
|
||||
success: Boolean(newInsert?.insertId),
|
||||
payload: newInsert,
|
||||
postInsertReturn: newInsert,
|
||||
queryObject: {
|
||||
sql: format(query),
|
||||
params: finalQueryValues,
|
||||
@@ -284,7 +284,7 @@ export default async function addDbEntry<
|
||||
} else {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "No data provided",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export default async function updateDbEntry<
|
||||
if (!data || !Object.keys(data).length) {
|
||||
return {
|
||||
success: false,
|
||||
payload: undefined,
|
||||
postInsertReturn: undefined,
|
||||
msg: "No data provided",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user