This commit is contained in:
2025-11-13 06:16:55 +01:00
parent e6b4b09277
commit 90c36f2345
28 changed files with 145 additions and 75 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ type Param = {
key: string;
code: string;
email: string | null;
database: string;
database?: string;
clientId: string;
clientSecret: string;
response: http.ServerResponse;
+4 -2
View File
@@ -19,6 +19,7 @@ const encrypt_1 = __importDefault(require("../../../functions/dsql/encrypt"));
const grab_host_names_1 = __importDefault(require("../../../utils/grab-host-names"));
const api_github_login_1 = __importDefault(require("../../../functions/api/users/social/api-github-login"));
const grab_cookie_expirt_date_1 = __importDefault(require("../../../utils/grab-cookie-expirt-date"));
const grab_db_names_1 = __importDefault(require("../../../utils/grab-db-names"));
/**
* # SERVER FUNCTION: Login with google Function
*/
@@ -62,7 +63,7 @@ function githubAuth(_a) {
*
* @description Look for local db settings in `.env` file and by pass the http request if available
*/
const { DSQL_DB_HOST, DSQL_DB_USERNAME, DSQL_DB_PASSWORD, DSQL_DB_NAME, DSQL_KEY, DSQL_REF_DB_NAME, DSQL_FULL_SYNC, } = process.env;
const { DSQL_DB_HOST, DSQL_DB_USERNAME, DSQL_DB_PASSWORD, DSQL_DB_NAME } = process.env;
if ((DSQL_DB_HOST === null || DSQL_DB_HOST === void 0 ? void 0 : DSQL_DB_HOST.match(/./)) &&
(DSQL_DB_USERNAME === null || DSQL_DB_USERNAME === void 0 ? void 0 : DSQL_DB_USERNAME.match(/./)) &&
(DSQL_DB_PASSWORD === null || DSQL_DB_PASSWORD === void 0 ? void 0 : DSQL_DB_PASSWORD.match(/./)) &&
@@ -74,13 +75,14 @@ function githubAuth(_a) {
dbSchema = JSON.parse(fs_1.default.readFileSync(localDbSchemaPath, "utf8"));
}
catch (error) { }
const { dbFullName } = (0, grab_db_names_1.default)({ dbName: database });
httpResponse = yield (0, api_github_login_1.default)({
code,
email: email || undefined,
clientId,
clientSecret,
additionalFields,
database: DSQL_DB_NAME,
database: dbFullName,
additionalData,
});
}