Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added run command for v2 repo
  • Loading branch information
sauravraw committed Sep 5, 2024
commit a29e1f59652b2cba654a2749f7c086f25bee6c73
20 changes: 10 additions & 10 deletions api/src/services/contentMapper.service.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove console

Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const updateContentType = async (req: Request) => {
);
return {
status: 400,
message: HTTP_TEXTS.CANNOT_UPDATE_CONTENT_MAPPING
message: HTTP_TEXTS.CANNOT_UPDATE_CONTENT_MAPPING,
};
}

Expand All @@ -334,7 +334,7 @@ const updateContentType = async (req: Request) => {
);
return {
status: 400,
message: HTTP_TEXTS.INVALID_CONTENT_TYPE
message: HTTP_TEXTS.INVALID_CONTENT_TYPE,
};
}

Expand Down Expand Up @@ -363,14 +363,15 @@ const updateContentType = async (req: Request) => {
)
);
await ContentTypesMapperModelLowdb.update((data: any) => {
data.ContentTypesMappers[updateIndex].status = CONTENT_TYPE_STATUS[3];
data.ContentTypesMappers[updateIndex].status =
CONTENT_TYPE_STATUS[3];
});
return {
status: 400,
status: 400,
message: `${VALIDATION_ERRORS.STRING_REQUIRED.replace(
"$",
"ContentstackFieldType or contentstackFieldUid"
)}`
)}`,
};
}
}
Expand Down Expand Up @@ -405,8 +406,8 @@ const updateContentType = async (req: Request) => {
)
);
return {
status: 404,
message: HTTP_TEXTS.CONTENT_TYPE_NOT_FOUND
status: 404,
message: HTTP_TEXTS.CONTENT_TYPE_NOT_FOUND,
};
}

Expand Down Expand Up @@ -437,9 +438,8 @@ const updateContentType = async (req: Request) => {

return {
status: 200,
data: { updatedContentType }
data: { updatedContentType },
};

} catch (error: any) {
logger.error(
getLogMessage(
Expand All @@ -450,7 +450,7 @@ const updateContentType = async (req: Request) => {
);
return {
status: error?.status || 500,
message: error?.message || HTTP_TEXTS.INTERNAL_ERROR
message: error?.message || HTTP_TEXTS.INTERNAL_ERROR,
};
}
};
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "(cd ./api && npm install --force) ; (cd ./ui && npm install --force) ; (cd ./uplaode-api && npm install --force)"
"postinstall": "(cd ./api && npm install --force) ; (cd ./ui && npm install --force) ; (cd ./uplaode-api && npm install --force)",
"api": "cd ./api && npm run dev",
"upload": "cd ./uplaode-api && npm start",
"ui": "cd ./ui && npm start"
},
"repository": {
"type": "git",
Expand Down
Loading