Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions api/src/services/contentMapper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const putTestData = async (req: Request) => {
contentTypes.map((type: any, index: any) => {
const fieldIds: string[] = [];
const fields = type?.fieldMapping?.map?.((field: any) => {
const id = field?.id.replace(/[{}-]/g, '').toLowerCase() || uuidv4();
const id = field?.id?.replace(/[{}]/g, '')?.toLowerCase() || uuidv4();
fieldIds.push(id);
return { id, projectId, isDeleted: true, ...field };
});
Expand All @@ -68,7 +68,7 @@ const putTestData = async (req: Request) => {
and the generated id values are pushed into the contentIds array.
*/
const contentType = contentTypes.map((item: any) => {
const id = item?.id.replace(/[{}-]/g, '').toLowerCase() || uuidv4();
const id = item?.id?.replace(/[{}]/g, '')?.toLowerCase() || uuidv4();
contentIds.push(id);
return { ...item, id, projectId };
});
Expand Down
4 changes: 2 additions & 2 deletions uplaode-api/migration-sitecore/libs/contenttypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ const contentTypeMapper = ({ components, standardValues, content_type, basePath,
if (isUrlfound === undefined) {
mainSchema?.unshift(
{
uid: "Url",
uid: "url",
"otherCmsField": "url",
"otherCmsType": "text",
"contentstackField": "Url",
Expand All @@ -478,7 +478,7 @@ const contentTypeMapper = ({ components, standardValues, content_type, basePath,
)
if (isPresent === undefined) {
mainSchema.unshift({
uid: "Title",
uid: "title",
"otherCmsField": "title",
"otherCmsType": "text",
"contentstackField": "Title",
Expand Down