Update Redis configuration and enhance collection update logic with error handling

This commit is contained in:
2025-10-22 13:41:35 +05:30
parent b58433d77f
commit dbd0132936
4 changed files with 12 additions and 6 deletions

4
.env
View File

@@ -8,8 +8,8 @@ SOCKET_PORT=8002
JWT_SECRET="Schema_Studio"
REFRESH_JWT_SECRET="Schema_Studio"
REDIS_ENV= true
REDIS_LOCAL =127.0.0.1
REDIS_ENV= false
REDIS_LOCAL = 192.168.0.203
REDIS_PORT=6379
EMAIL_USER=nivetha@hexrfactory.com

View File

@@ -91,9 +91,9 @@ export const updateCollectionController = async (
): Promise<void> => {
try {
const { organization, userId } = req.user || {};
const { collectionNodeId } = req.params
const {
projectId,
collectionNodeId,
collectionName,
position,
backgroundColor,

View File

@@ -24,9 +24,9 @@ collectionNodeRoutes.post(
authorizedRoles("Admin", "Editor", "Viewer"),
NodeCreationController
);
//collection Added
//collection update
collectionNodeRoutes.patch(
"/nodes/collectionName",
"/nodes/:collectionNodeId",
tokenValidator,
authorizedRoles("Admin", "Editor", "Viewer"),
updateCollectionController

View File

@@ -231,7 +231,13 @@ export const updatecollection = async (
},
{ new: true }
);
return { status: "Success" };
if(collectionNameupdate){
return { status: "Success" };
}
else{
return {status:"Update unsuccessfull"}
}
}
} catch (error: unknown) {
if (error instanceof Error) {