diff --git a/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs index 643c248d64..b7f29edc92 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs @@ -46,7 +46,7 @@ public interface IRedirectUrlRepository : IReadWriteQueryRepository /// The Umbraco redirect URL route. /// The most recent redirect URL corresponding to the route. - Task GetMostRecentUrlAsync(string url); + Task GetMostRecentUrlAsync(string url) => Task.FromResult(GetMostRecentUrl(url)); /// /// Gets the most recent redirect URL corresponding to an Umbraco redirect URL route. @@ -62,7 +62,7 @@ public interface IRedirectUrlRepository : IReadWriteQueryRepositoryThe Umbraco redirect URL route. /// The culture the domain is associated with /// The most recent redirect URL corresponding to the route. - Task GetMostRecentUrlAsync(string url, string culture); + Task GetMostRecentUrlAsync(string url, string culture) => Task.FromResult(GetMostRecentUrl(url, culture)); /// /// Gets all redirect URLs for a content item. diff --git a/src/Umbraco.Core/Services/IRedirectUrlService.cs b/src/Umbraco.Core/Services/IRedirectUrlService.cs index f40d5fbf75..f1897053f0 100644 --- a/src/Umbraco.Core/Services/IRedirectUrlService.cs +++ b/src/Umbraco.Core/Services/IRedirectUrlService.cs @@ -60,7 +60,7 @@ public interface IRedirectUrlService : IService /// The Umbraco redirect URL route. /// The culture of the request. /// The most recent redirect URLs corresponding to the route. - Task GetMostRecentRedirectUrlAsync(string url, string? culture); + Task GetMostRecentRedirectUrlAsync(string url, string? culture) => Task.FromResult(GetMostRecentRedirectUrl(url, culture)); /// /// Gets all redirect URLs for a content item.