* Run code cleanup * Start manual run * Finish dotnet format + manual cleanup * Fix up after merge * Fix substrings changed to [..] Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Zeegaan <nge@umbraco.dk>
24 lines
976 B
C#
24 lines
976 B
C#
using Microsoft.AspNetCore.Routing;
|
|
using Umbraco.Cms.Core;
|
|
using Umbraco.Cms.Web.BackOffice.Install;
|
|
|
|
namespace Umbraco.Extensions;
|
|
|
|
public static class BackofficeLinkGeneratorExtensions
|
|
{
|
|
/// <summary>
|
|
/// Returns the URL for the installer
|
|
/// </summary>
|
|
public static string? GetInstallerUrl(this LinkGenerator linkGenerator)
|
|
=> linkGenerator.GetPathByAction(nameof(InstallController.Index), ControllerExtensions.GetControllerName<InstallController>(), new { area = Constants.Web.Mvc.InstallArea });
|
|
|
|
/// <summary>
|
|
/// Returns the URL for the installer api
|
|
/// </summary>
|
|
public static string? GetInstallerApiUrl(this LinkGenerator linkGenerator)
|
|
=> linkGenerator.GetPathByAction(
|
|
nameof(InstallApiController.GetSetup),
|
|
ControllerExtensions.GetControllerName<InstallApiController>(),
|
|
new { area = Constants.Web.Mvc.InstallArea })?.TrimEnd(nameof(InstallApiController.GetSetup));
|
|
}
|