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.

Remove unused IFormCollection (SubAccountAddCommand)

supportdd5b94d8f10e
diff --git a/src/Web/Grand.Web/Commands/Models/Customers/SubAccountAddCommand.cs b/src/Web/Grand.Web/Commands/Models/Customers/SubAccountAddCommand.cs
index cf9a94da2..7c24f77b3 100644
--- a/src/Web/Grand.Web/Commands/Models/Customers/SubAccountAddCommand.cs
+++ b/src/Web/Grand.Web/Commands/Models/Customers/SubAccountAddCommand.cs
@@ -3,7 +3,6 @@ using Grand.Domain.Customers;
using Grand.Domain.Stores;
using Grand.Web.Models.Customer;
using MediatR;
-using Microsoft.AspNetCore.Http;
namespace Grand.Web.Commands.Models.Customers
{
@@ -12,6 +11,5 @@ namespace Grand.Web.Commands.Models.Customers
public Customer Customer { get; set; }
public Store Store { get; set; }
public SubAccountModel Model { get; set; }
- public IFormCollection Form { get; set; }
}
}
diff --git a/src/Web/Grand.Web/Controllers/AccountController.cs b/src/Web/Grand.Web/Controllers/AccountController.cs
index e9a04d71b..9c9a88559 100644
--- a/src/Web/Grand.Web/Controllers/AccountController.cs
+++ b/src/Web/Grand.Web/Controllers/AccountController.cs
@@ -1286,7 +1286,7 @@ namespace Grand.Web.Controllers
[HttpPost]
[AutoValidateAntiforgeryToken]
- public virtual async Task<IActionResult> SubAccountAdd(SubAccountModel model, IFormCollection form)
+ public virtual async Task<IActionResult> SubAccountAdd(SubAccountModel model)
{
if (!await _groupService.IsRegistered(_workContext.CurrentCustomer))
return Challenge();
@@ -1299,7 +1299,6 @@ namespace Grand.Web.Controllers
var result = await _mediator.Send(new SubAccountAddCommand() {
Customer = _workContext.CurrentCustomer,
Model = model,
- Form = form,
Store = _workContext.CurrentStore
});