Deduplicate the magic string "/management/api/" (#16016)
This commit is contained in:
@@ -62,6 +62,11 @@ public static partial class Constants
|
||||
public const string BackOfficeLoginArea = "UmbracoLogin"; // Used for area routes of non-api controllers for login
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The "base" path to the Management API
|
||||
/// </summary>
|
||||
public const string ManagementApiPath = "/management/api/";
|
||||
|
||||
public static class Routing
|
||||
{
|
||||
public const string ControllerToken = "controller";
|
||||
|
||||
@@ -40,7 +40,7 @@ public class UmbracoRequestPaths
|
||||
_previewMvcPath = "/" + mvcArea + "/Preview/";
|
||||
_surfaceMvcPath = "/" + mvcArea + "/Surface/";
|
||||
_apiMvcPath = "/" + mvcArea + "/Api/";
|
||||
_managementApiPath = "/" + mvcArea + "/management/api/";
|
||||
_managementApiPath = "/" + mvcArea + Constants.Web.ManagementApiPath;
|
||||
_installPath = hostingEnvironment.ToAbsolute(Constants.SystemDirectories.Install);
|
||||
_umbracoRequestPathsOptions = umbracoRequestPathsOptions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user