Skip to content

Commit 3085bd6

Browse files
authored
Merge pull request #470 from contentstack/feature/dropdown-field-choices
Feature/dropdown field choices
2 parents be47c79 + 1071799 commit 3085bd6

File tree

6 files changed

+87
-57
lines changed

6 files changed

+87
-57
lines changed

api/production.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
APP_TOKEN_KEY=MIGRATION_V2
2+
PORT=5001
3+

api/src/services/migration.service.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ const startTestMigration = async (req: Request): Promise<any> => {
242242
await wordpressService?.createAssetFolderFile(file_path, project?.current_test_stack_id, projectId)
243243
await wordpressService?.getAllreference(file_path, packagePath, project?.current_test_stack_id, projectId)
244244
await wordpressService?.extractChunks(file_path, packagePath, project?.current_test_stack_id, projectId)
245-
await wordpressService?.getAllAuthors(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys)
245+
await wordpressService?.getAllAuthors(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale)
246246
//await wordpressService?.extractContentTypes(projectId, project?.current_test_stack_id, contentTypes)
247-
await wordpressService?.getAllTerms(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys)
248-
await wordpressService?.getAllTags(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys)
249-
await wordpressService?.getAllCategories(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys)
250-
await wordpressService?.extractPosts(packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys)
247+
await wordpressService?.getAllTerms(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
248+
await wordpressService?.getAllTags(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
249+
await wordpressService?.getAllCategories(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
250+
await wordpressService?.extractPosts(packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
251251
await wordpressService?.extractGlobalFields(project?.current_test_stack_id, projectId)
252252
await wordpressService?.createVersionFile(project?.current_test_stack_id, projectId);
253253
}
@@ -314,16 +314,16 @@ const startMigration = async (req: Request): Promise<any> => {
314314
}
315315
case CMS.WORDPRESS: {
316316
if (packagePath) {
317-
await wordpressService?.getAllAssets(file_path, packagePath, project?.destination_stack_id, projectId)
317+
await wordpressService?.getAllAssets(file_path, packagePath, project?.destination_stack_id, projectId,)
318318
await wordpressService?.createAssetFolderFile(file_path, project?.destination_stack_id, projectId)
319319
await wordpressService?.getAllreference(file_path, packagePath, project?.destination_stack_id, projectId)
320320
await wordpressService?.extractChunks(file_path, packagePath, project?.destination_stack_id, projectId)
321-
await wordpressService?.getAllAuthors(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys)
321+
await wordpressService?.getAllAuthors(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
322322
//await wordpressService?.extractContentTypes(projectId, project?.destination_stack_id)
323-
await wordpressService?.getAllTerms(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys)
324-
await wordpressService?.getAllTags(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys)
325-
await wordpressService?.getAllCategories(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys)
326-
await wordpressService?.extractPosts(packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys)
323+
await wordpressService?.getAllTerms(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale)
324+
await wordpressService?.getAllTags(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
325+
await wordpressService?.getAllCategories(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
326+
await wordpressService?.extractPosts(packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys,project?.stackDetails?.master_locale)
327327
await wordpressService?.extractGlobalFields(project?.destination_stack_id, projectId)
328328
await wordpressService?.createVersionFile(project?.destination_stack_id, projectId);
329329

0 commit comments

Comments
 (0)