From 25826958a3a1563d4ff1b842a00459f88394cf71 Mon Sep 17 00:00:00 2001 From: Jeroen Breuer Date: Wed, 30 Jul 2014 16:34:33 +0200 Subject: [PATCH 1/2] Fix 4 for #187 --- .../Umbraco.Archetype/Api/ArchetypeDataTypeController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs b/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs index a544c3a..9de2913 100644 --- a/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs +++ b/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs @@ -28,7 +28,7 @@ namespace Archetype.Api return dataTypes.Select(t => new { guid = t.Key, name = t.Name }); } - public object GetByGuid(Guid guid) + public object GetByGuid(Guid guid, string contentTypeAlias, string propertyTypeAlias, string archetypeAlias) { var dataType = Services.DataTypeService.GetDataTypeDefinitionById(guid); if (dataType == null) @@ -36,7 +36,7 @@ namespace Archetype.Api throw new HttpResponseException(HttpStatusCode.NotFound); } var dataTypeDisplay = Mapper.Map(dataType); - return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues }; + return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues, contentTypeAlias = contentTypeAlias, propertyTypeAlias = propertyTypeAlias, archetypeAlias = archetypeAlias }; } } } From 57ffa69ff5f87a79c883d218648ac36d662f0202 Mon Sep 17 00:00:00 2001 From: Jeroen Breuer Date: Thu, 31 Jul 2014 12:12:35 +0200 Subject: [PATCH 2/2] Added node id --- .../Umbraco.Archetype/Api/ArchetypeDataTypeController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs b/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs index 9de2913..5770d2e 100644 --- a/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs +++ b/app/Umbraco/Umbraco.Archetype/Api/ArchetypeDataTypeController.cs @@ -28,7 +28,7 @@ namespace Archetype.Api return dataTypes.Select(t => new { guid = t.Key, name = t.Name }); } - public object GetByGuid(Guid guid, string contentTypeAlias, string propertyTypeAlias, string archetypeAlias) + public object GetByGuid(Guid guid, string contentTypeAlias, string propertyTypeAlias, string archetypeAlias, int nodeId) { var dataType = Services.DataTypeService.GetDataTypeDefinitionById(guid); if (dataType == null) @@ -36,7 +36,7 @@ namespace Archetype.Api throw new HttpResponseException(HttpStatusCode.NotFound); } var dataTypeDisplay = Mapper.Map(dataType); - return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues, contentTypeAlias = contentTypeAlias, propertyTypeAlias = propertyTypeAlias, archetypeAlias = archetypeAlias }; + return new { selectedEditor = dataTypeDisplay.SelectedEditor, preValues = dataTypeDisplay.PreValues, contentTypeAlias = contentTypeAlias, propertyTypeAlias = propertyTypeAlias, archetypeAlias = archetypeAlias, nodeId = nodeId }; } } }