Revert files that shouldn't change back in v11

This commit is contained in:
Sebastiaan Janssen
2022-09-19 16:37:24 +02:00
parent 85147fb5e8
commit db5d05d641
201 changed files with 933 additions and 1859 deletions

View File

@@ -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>