fix build errors
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Umbraco.Extensions
|
||||
this IEndpointRouteBuilder endpoints,
|
||||
Type controllerType,
|
||||
string rootSegment,
|
||||
string areaName,
|
||||
string? areaName,
|
||||
string? prefixPathSegment,
|
||||
string defaultAction = "Index",
|
||||
bool includeControllerNameInRoute = true,
|
||||
@@ -57,7 +57,7 @@ namespace Umbraco.Extensions
|
||||
|
||||
// named consistently
|
||||
$"umbraco-{areaName}-{controllerName}".ToLowerInvariant(),
|
||||
areaName,
|
||||
areaName!,
|
||||
pattern.ToString().ToLowerInvariant(),
|
||||
defaults,
|
||||
constraints);
|
||||
@@ -98,7 +98,7 @@ namespace Umbraco.Extensions
|
||||
/// </summary>
|
||||
public static void MapUmbracoApiRoute(
|
||||
this IEndpointRouteBuilder endpoints,
|
||||
Type? controllerType,
|
||||
Type controllerType,
|
||||
string rootSegment,
|
||||
string? areaName,
|
||||
bool isBackOffice,
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Umbraco.Extensions
|
||||
if (!hasCookie) return false;
|
||||
|
||||
// get the cookie value
|
||||
if (!httpContext.Request.Cookies.TryGetValue(cookieName, out var cookieVal))
|
||||
if (httpContext is null || !httpContext.Request.Cookies.TryGetValue(cookieName, out var cookieVal))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Umbraco.Cms.Web.Common.ModelsBuilder
|
||||
throw new ArgumentException("Null umbracoUrls");
|
||||
}
|
||||
|
||||
if (!(umbracoUrlsObject is Dictionary<string, object> umbracoUrls))
|
||||
if (!(umbracoUrlsObject is Dictionary<string, object?> umbracoUrls))
|
||||
{
|
||||
throw new ArgumentException("Invalid umbracoUrls");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user