This commit is contained in:
Benjamin Toby
2025-01-12 18:19:20 +01:00
parent a3561da53d
commit 186cc76ffb
46 changed files with 344 additions and 211 deletions
@@ -55,7 +55,7 @@ function githubLogin(_a) {
}
}
catch ( /** @type {any} */error) {
console.log("ERROR in githubLogin.js backend function =>", error.message);
console.log("ERROR in githubLogin.ts backend function =>", error.message);
}
return gitHubUser;
});
@@ -182,16 +182,16 @@ function handleSocialDb(_a) {
});
}
else {
console.log("Social User Failed to insert in 'handleSocialDb.js' backend function =>", newUser);
console.log("Social User Failed to insert in 'handleSocialDb.ts' backend function =>", newUser);
return {
success: false,
payload: null,
msg: "Social User Failed to insert in 'handleSocialDb.js' backend function",
msg: "Social User Failed to insert in 'handleSocialDb.ts' backend function",
};
}
}
catch (error) {
console.log("ERROR in 'handleSocialDb.js' backend function =>", error.message);
console.log("ERROR in 'handleSocialDb.ts' backend function =>", error.message);
return {
success: false,
payload: null,
@@ -88,7 +88,7 @@ function apiGoogleLogin(_a) {
return Object.assign({}, loggedInGoogleUser);
}
catch ( /** @type {any} */error) {
console.log(`apo-google-login.js ERROR: ${error.message}`);
console.log(`api-google-login.ts ERROR: ${error.message}`);
return {
success: false,
payload: undefined,
+1 -1
View File
@@ -71,7 +71,7 @@ function addUsersTableToDb(_a) {
return `Done!`;
}
catch ( /** @type {any} */error) {
console.log(`addUsersTableToDb.js ERROR: ${error.message}`);
console.log(`addUsersTableToDb.ts ERROR: ${error.message}`);
(0, serverError_1.default)({
component: "addUsersTableToDb",
message: error.message,
+1 -1
View File
@@ -4,5 +4,5 @@
* @description this function takes in a text(or number) and returns a sanitized
* text, usually without spaces
*/
declare function sanitizeSql(text: any, spaces: boolean, regex?: RegExp | null): any;
declare function sanitizeSql(text: any, spaces?: boolean, regex?: RegExp | null): any;
export default sanitizeSql;
@@ -32,7 +32,7 @@ function grabNewUsersTableSchema(params) {
return userPreset;
}
catch ( /** @type {any} */error) {
console.log(`grabNewUsersTableSchema.js ERROR: ${error.message}`);
console.log(`grabNewUsersTableSchema.ts ERROR: ${error.message}`);
(0, serverError_1.default)({
component: "grabNewUsersTableSchema",
message: error.message,
@@ -56,9 +56,9 @@ function grabSchemaFieldsFromData({ data, fields, excludeData, excludeFields, })
return finalFields;
}
catch ( /** @type {any} */error) {
console.log(`grabSchemaFieldsFromData.js ERROR: ${error.message}`);
console.log(`grabSchemaFieldsFromData.ts ERROR: ${error.message}`);
(0, serverError_1.default)({
component: "grabSchemaFieldsFromData.js",
component: "grabSchemaFieldsFromData.ts",
message: error.message,
});
return [];
@@ -52,7 +52,7 @@ function updateUsersTableSchema(_a) {
return `Done!`;
}
catch (error) {
console.log(`addUsersTableToDb.js ERROR: ${error.message}`);
console.log(`addUsersTableToDb.ts ERROR: ${error.message}`);
(0, serverError_1.default)({
component: "addUsersTableToDb",
message: error.message,
-1
View File
@@ -41,4 +41,3 @@ function encrypt({ data, encryptionKey, encryptionSalt, }) {
return data;
}
}
module.exports = encrypt;