diff --git a/.env b/.env index e76db5d..ef923d6 100644 --- a/.env +++ b/.env @@ -3,7 +3,10 @@ MONGO_URI=mongodb://mongo/ MONGO_USER=admin MONGO_PASSWORD=dwinzo_v0 MONGO_AUTH_DB=admin - +# MONGO_URI=mongodb://192.168.0.110/ +# MONGO_USER=mydata +# MONGO_PASSWORD=mongodb@hexr2002 +# MONGO_AUTH_DB=admin API_PORT=4999 SOCKET_PORT=7999 NODE_ENV=development @@ -23,4 +26,6 @@ REFRESH_JWT_SECRET="RefreshDwinzoProject" REDIS_ENV= true REDIS_DOCKER =185.100.212.76 -REDIS_PORT=6666 \ No newline at end of file +REDIS_PORT=6666 +# REDIS_LOCAL =127.0.0.1 +# REDIS_PORT=6379 \ No newline at end of file diff --git a/src/api-server/V1/v1Controllers/homeController/v1homeController.ts b/src/api-server/V1/v1Controllers/homeController/v1homeController.ts index 228b0ff..b566dbd 100644 --- a/src/api-server/V1/v1Controllers/homeController/v1homeController.ts +++ b/src/api-server/V1/v1Controllers/homeController/v1homeController.ts @@ -12,13 +12,13 @@ export const recentDataController = async ( ): Promise => { try { const { userId, organization, role } = req.user || {}; - if (!userId || !organization || !role) { + if (!userId || !organization) { res.status(400).json({ message: "All fields are required", }); return; } - const result = await RecentlyAdded({ userId, organization, role }); + const result = await RecentlyAdded({ userId, organization }); switch (result.status) { case "User not found": @@ -55,7 +55,7 @@ export const searchProjectController = async ( ): Promise => { try { const { userId, organization, role } = req.user || {}; - if (!userId || !organization || !role) { + if (!userId || !organization) { res.status(400).json({ message: "All fields are required", }); @@ -104,7 +104,7 @@ export const searchTrashProjectController = async ( ): Promise => { try { const { userId, organization, role } = req.user || {}; - if (!userId || !organization || !role) { + if (!userId || !organization) { res.status(400).json({ message: "All fields are required", }); diff --git a/src/shared/services/v1home/v1homeservice.ts b/src/shared/services/v1home/v1homeservice.ts index 9d820e8..fa99666 100644 --- a/src/shared/services/v1home/v1homeservice.ts +++ b/src/shared/services/v1home/v1homeservice.ts @@ -5,7 +5,7 @@ import { existingUser } from "../helpers/v1projecthelperFns.ts"; interface IRecentData { organization: string; userId: string; - role: string; + // role: string; } interface IProject { _id: string;