Updates
This commit is contained in:
@@ -22,6 +22,7 @@ const grab_query_and_values_1 = __importDefault(require("../../../utils/grab-que
|
||||
*/
|
||||
function apiGet(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ query, dbFullName, queryValues, tableName, dbSchema, debug, dbContext, forceLocal, }) {
|
||||
var _b;
|
||||
const queryAndValues = (0, grab_query_and_values_1.default)({
|
||||
query,
|
||||
values: queryValues,
|
||||
@@ -78,6 +79,7 @@ function apiGet(_a) {
|
||||
component: "/api/query/get/lines-85-94",
|
||||
message: error.message,
|
||||
});
|
||||
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `API Get Error`, error);
|
||||
if (debug && global.DSQL_USE_LOCAL) {
|
||||
console.log("apiGet:error", error.message);
|
||||
}
|
||||
|
||||
+2
-1
@@ -21,7 +21,7 @@ const runQuery_1 = __importDefault(require("../../backend/db/runQuery"));
|
||||
*/
|
||||
function apiPost(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ query, dbFullName, queryValues, tableName, dbSchema, dbContext, forceLocal, }) {
|
||||
var _b;
|
||||
var _b, _c;
|
||||
if (typeof query === "string" && (query === null || query === void 0 ? void 0 : query.match(/^create |^alter |^drop /i))) {
|
||||
return { success: false, msg: "Wrong Input" };
|
||||
}
|
||||
@@ -75,6 +75,7 @@ function apiPost(_a) {
|
||||
component: "/api/query/post/lines-132-142",
|
||||
message: error.message,
|
||||
});
|
||||
(_c = global.ERROR_CALLBACK) === null || _c === void 0 ? void 0 : _c.call(global, `API Post Error`, error);
|
||||
return {
|
||||
success: false,
|
||||
payload: results,
|
||||
|
||||
@@ -22,7 +22,7 @@ const hashPassword_1 = __importDefault(require("../../dsql/hashPassword"));
|
||||
*/
|
||||
function googleLogin(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ usertype, foundUser, isSocialValidated, isUserValid, reqBody, serverRes, loginFailureReason, }) {
|
||||
var _b;
|
||||
var _b, _c;
|
||||
const client = new google_auth_library_1.OAuth2Client(process.env.DSQL_GOOGLE_CLIENT_ID);
|
||||
let isGoogleAuthValid = false;
|
||||
let newFoundUser = null;
|
||||
@@ -114,6 +114,7 @@ function googleLogin(_a) {
|
||||
component: "googleLogin",
|
||||
message: error.message,
|
||||
});
|
||||
(_c = global.ERROR_CALLBACK) === null || _c === void 0 ? void 0 : _c.call(global, `Google Login Error`, error);
|
||||
loginFailureReason = error;
|
||||
isUserValid = false;
|
||||
isSocialValidated = false;
|
||||
|
||||
@@ -26,6 +26,7 @@ const loginSocialUser_1 = __importDefault(require("./loginSocialUser"));
|
||||
*/
|
||||
function handleSocialDb(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ database, social_id, email, social_platform, payload, invitation, supEmail, additionalFields, debug, }) {
|
||||
var _b;
|
||||
try {
|
||||
const finalDbName = global.DSQL_USE_LOCAL
|
||||
? undefined
|
||||
@@ -209,6 +210,7 @@ function handleSocialDb(_a) {
|
||||
}
|
||||
catch (error) {
|
||||
console.log("ERROR in 'handleSocialDb.ts' backend function =>", error.message);
|
||||
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Handle Social DB Error`, error);
|
||||
return {
|
||||
success: false,
|
||||
payload: null,
|
||||
|
||||
Reference in New Issue
Block a user