Update Redis configuration and enhance collection update logic with error handling
This commit is contained in:
4
.env
4
.env
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user