Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Grand.Web - add attribute IgnoreApi to some actions

supportcdc4783f5d78
diff --git a/src/Web/Grand.Web/Controllers/AccountController.cs b/src/Web/Grand.Web/Controllers/AccountController.cs
index 883329fe2..194bd26df 100644
--- a/src/Web/Grand.Web/Controllers/AccountController.cs
+++ b/src/Web/Grand.Web/Controllers/AccountController.cs
@@ -1006,6 +1006,7 @@ namespace Grand.Web.Controllers
#endregion
#region My account / TwoFactorAuth
+ [IgnoreApi]
[HttpGet]
public async Task<IActionResult> EnableTwoFactorAuthenticator()
{
@@ -1025,7 +1026,7 @@ namespace Grand.Web.Controllers
});
return View(model);
}
-
+ [IgnoreApi]
[HttpPost]
public async Task<IActionResult> EnableTwoFactorAuthenticator(
CustomerInfoModel.TwoFactorAuthenticationModel model,
@@ -1066,7 +1067,7 @@ namespace Grand.Web.Controllers
return View(model);
}
-
+ [IgnoreApi]
[HttpGet]
public async Task<IActionResult> DisableTwoFactorAuthenticator()
{
@@ -1091,7 +1092,7 @@ namespace Grand.Web.Controllers
return View(model);
}
-
+ [IgnoreApi]
[HttpPost]
public async Task<IActionResult> DisableTwoFactorAuthenticator(
CustomerInfoModel.TwoFactorAuthorizationModel model,
diff --git a/src/Web/Grand.Web/Controllers/CommonController.cs b/src/Web/Grand.Web/Controllers/CommonController.cs
index da1f781b0..26c2233c7 100644
--- a/src/Web/Grand.Web/Controllers/CommonController.cs
+++ b/src/Web/Grand.Web/Controllers/CommonController.cs
@@ -433,6 +433,7 @@ namespace Grand.Web.Controllers
var sb = await _mediator.Send(new GetRobotsTextFile { StoreId = _workContext.CurrentStore.Id });
return Content(sb, "text/plain");
}
+ [IgnoreApi]
[HttpGet]
public virtual IActionResult GenericUrl()
{
diff --git a/src/Web/Grand.Web/Controllers/OrderController.cs b/src/Web/Grand.Web/Controllers/OrderController.cs
index cddcc826a..fb259c895 100644
--- a/src/Web/Grand.Web/Controllers/OrderController.cs
+++ b/src/Web/Grand.Web/Controllers/OrderController.cs
@@ -10,6 +10,7 @@ using Grand.Domain.Payments;
using Grand.Domain.Shipping;
using Grand.Infrastructure;
using Grand.Web.Commands.Models.Orders;
+using Grand.Web.Common.Attributes;
using Grand.Web.Common.Controllers;
using Grand.Web.Common.Filters;
using Grand.Web.Common.Page;
@@ -109,6 +110,7 @@ namespace Grand.Web.Controllers
}
//My account / Order details page / Print
+ [IgnoreApi]
[HttpGet]
public virtual async Task<IActionResult> PrintOrderDetails(string orderId)
{
diff --git a/src/Web/Grand.Web/Controllers/ShoppingCartController.cs b/src/Web/Grand.Web/Controllers/ShoppingCartController.cs
index 40553e4b0..b8f2a9e27 100644
--- a/src/Web/Grand.Web/Controllers/ShoppingCartController.cs
+++ b/src/Web/Grand.Web/Controllers/ShoppingCartController.cs
@@ -15,6 +15,7 @@ using Grand.Domain.Media;
using Grand.Domain.Orders;
using Grand.Infrastructure;
using Grand.Web.Commands.Models.ShoppingCart;
+using Grand.Web.Common.Attributes;
using Grand.Web.Common.Controllers;
using Grand.Web.Common.Extensions;
using Grand.Web.Common.Filters;
@@ -476,6 +477,8 @@ namespace Grand.Web.Controllers
sidebarshoppingcartmodel = miniShoppingCart
});
}
+
+ [IgnoreApi]
[HttpGet]
public virtual IActionResult ContinueShopping()
{