Revert files that shouldn't change back in v11
This commit is contained in:
@@ -471,46 +471,6 @@ public class EntityController : UmbracoAuthorizedJsonController
|
||||
.Select(id => new { Id = id, Url = MediaOrDocumentUrl(id) }).ToDictionary(x => x.Id, x => x.Url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get entity URLs by UDIs
|
||||
/// </summary>
|
||||
/// <param name="udis">
|
||||
/// A list of UDIs to lookup items by
|
||||
/// </param>
|
||||
/// <param name="culture">The culture to fetch the URL for</param>
|
||||
/// <returns>Dictionary mapping Udi -> Url</returns>
|
||||
/// <remarks>
|
||||
/// We allow for POST because there could be quite a lot of Ids.
|
||||
/// </remarks>
|
||||
[HttpGet]
|
||||
[HttpPost]
|
||||
[Obsolete("Use GetUrlsByIds instead.")]
|
||||
public IDictionary<Udi, string?> GetUrlsByUdis([FromJsonPath] Udi[] udis, string? culture = null)
|
||||
{
|
||||
if (udis == null || !udis.Any())
|
||||
{
|
||||
return new Dictionary<Udi, string?>();
|
||||
}
|
||||
|
||||
var udiEntityType = udis.First().EntityType;
|
||||
UmbracoEntityTypes entityType;
|
||||
|
||||
switch (udiEntityType)
|
||||
{
|
||||
case Constants.UdiEntityType.Document:
|
||||
entityType = UmbracoEntityTypes.Document;
|
||||
break;
|
||||
case Constants.UdiEntityType.Media:
|
||||
entityType = UmbracoEntityTypes.Media;
|
||||
break;
|
||||
default:
|
||||
entityType = (UmbracoEntityTypes)(-1);
|
||||
break;
|
||||
}
|
||||
|
||||
return GetUrlsByIds(udis, entityType, culture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of an entity
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user