diff --git a/src/controllers/AuthRoleController.ts b/src/controllers/AuthRoleController.ts index a549dfb5..13f5ce04 100644 --- a/src/controllers/AuthRoleController.ts +++ b/src/controllers/AuthRoleController.ts @@ -128,7 +128,6 @@ export class AuthRoleController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); redisClient.del("role_" + posMaster.current_holderId, (err: Error) => { @@ -297,7 +296,6 @@ export class AuthRoleController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); await redisClient.flushdb(function (err: any, succeeded: any) { diff --git a/src/controllers/OrganizationController.ts b/src/controllers/OrganizationController.ts index 605b2fa5..8358313b 100644 --- a/src/controllers/OrganizationController.ts +++ b/src/controllers/OrganizationController.ts @@ -8830,7 +8830,6 @@ export class OrganizationController extends Controller { const redisClient = redis.createClient({ host: process.env.REDIS_HOST || "localhost", port: parseInt(process.env.REDIS_PORT || "6379"), - password: process.env.REDIS_PASSWORD, }); const keysAsync = promisify(redisClient.keys).bind(redisClient); const delAsync = promisify(redisClient.del).bind(redisClient); diff --git a/src/controllers/PermissionController.ts b/src/controllers/PermissionController.ts index 324a42b4..44747b09 100644 --- a/src/controllers/PermissionController.ts +++ b/src/controllers/PermissionController.ts @@ -42,7 +42,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -294,7 +293,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -693,7 +691,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -810,7 +807,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -906,7 +902,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -1160,7 +1155,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const getAsync = promisify(redisClient.get).bind(redisClient); @@ -1419,7 +1413,6 @@ export class PermissionController extends Controller { redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); // const getAsync = promisify(redisClient.get).bind(redisClient); diff --git a/src/controllers/PosMasterActController.ts b/src/controllers/PosMasterActController.ts index 9ccf1d9c..fbc09201 100644 --- a/src/controllers/PosMasterActController.ts +++ b/src/controllers/PosMasterActController.ts @@ -328,7 +328,6 @@ export class PosMasterActController extends Controller { const redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const delAsync = promisify(redisClient.del).bind(redisClient); @@ -866,7 +865,6 @@ export class PosMasterActController extends Controller { const redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const delAsync = promisify(redisClient.del).bind(redisClient); diff --git a/src/interfaces/extension.ts b/src/interfaces/extension.ts index a2a55256..405ed849 100644 --- a/src/interfaces/extension.ts +++ b/src/interfaces/extension.ts @@ -384,7 +384,6 @@ class Extension { const redisClient = redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const delAsync = promisify(redisClient.del).bind(redisClient); const deleteKey = delAsync(type + id); diff --git a/src/interfaces/permission.ts b/src/interfaces/permission.ts index aa1903ec..5d22d274 100644 --- a/src/interfaces/permission.ts +++ b/src/interfaces/permission.ts @@ -217,20 +217,17 @@ class CheckAuth { // Create Redis client const redisClient = this.redis.createClient({ - // socket: { - // host: REDIS_HOST, - // port: REDIS_PORT, - // }, - host: REDIS_HOST, - port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, + socket: { + host: REDIS_HOST, + port: REDIS_PORT, + }, }); redisClient.on("error", (err: any) => { console.error("[REDIS] Connection error:", err.message); }); - // await redisClient.connect(); + await redisClient.connect(); console.log("[REDIS] Connected successfully!"); const getAsync = promisify(redisClient.get).bind(redisClient); diff --git a/src/services/ExecuteOrgCommandService.ts b/src/services/ExecuteOrgCommandService.ts index 31a7d317..62ed231f 100644 --- a/src/services/ExecuteOrgCommandService.ts +++ b/src/services/ExecuteOrgCommandService.ts @@ -844,7 +844,6 @@ export class ExecuteOrgCommandService { const redisClient = await redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const delAsync = promisify(redisClient.del).bind(redisClient); diff --git a/src/services/rabbitmq.ts b/src/services/rabbitmq.ts index b4e81c41..227c431c 100644 --- a/src/services/rabbitmq.ts +++ b/src/services/rabbitmq.ts @@ -1987,7 +1987,6 @@ async function clearMenuAndRoleCache(): Promise { const redisClient = redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, - password: process.env.REDIS_PASSWORD, }); const keysAsync = promisify(redisClient.keys).bind(redisClient);