Adds new endpoint to DataTypeController to return the correct data and wires that up to angular

This commit is contained in:
Shannon
2019-10-09 15:19:03 +11:00
parent 0e34c5e3c2
commit ac300179e6
10 changed files with 111 additions and 102 deletions

View File

@@ -0,0 +1,36 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
namespace Umbraco.Web.Models.ContentEditing
{
[DataContract(Name = "dataTypeUsages", Namespace = "")]
public class DataTypeReferences
{
[DataMember(Name = "documentTypes")]
public IEnumerable<ContentTypeReferences> DocumentTypes { get; set; } = Enumerable.Empty<ContentTypeReferences>();
[DataMember(Name = "mediaTypes")]
public IEnumerable<ContentTypeReferences> MediaTypes { get; set; } = Enumerable.Empty<ContentTypeReferences>();
[DataMember(Name = "memberTypes")]
public IEnumerable<ContentTypeReferences> MemberTypes { get; set; } = Enumerable.Empty<ContentTypeReferences>();
[DataContract(Name = "contentType", Namespace = "")]
public class ContentTypeReferences : EntityBasic
{
[DataMember(Name = "properties")]
public object Properties { get; set; }
[DataContract(Name = "property", Namespace = "")]
public class PropertyTypeReferences
{
[DataMember(Name = "name")]
public string Name { get; set; }
[DataMember(Name = "alias")]
public string Alias { get; set; }
}
}
}
}