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.

ContactUs - change endpoint

support3d796c63ffd2
diff --git a/src/Web/Grand.Web/Controllers/ContactController.cs b/src/Web/Grand.Web/Controllers/ContactController.cs
index 5308cebef..0e0815e07 100644
--- a/src/Web/Grand.Web/Controllers/ContactController.cs
+++ b/src/Web/Grand.Web/Controllers/ContactController.cs
@@ -42,7 +42,7 @@ public class ContactController : BasePublicController
//available even when a store is closed
[ClosedStore(true)]
[HttpGet]
- public virtual async Task<IActionResult> ContactUs(
+ public virtual async Task<IActionResult> Index(
[FromServices] StoreInformationSettings storeInformationSettings,
[FromServices] IPageService pageService)
{
@@ -65,7 +65,7 @@ public class ContactController : BasePublicController
[AutoValidateAntiforgeryToken]
[ClosedStore(true)]
[DenySystemAccount]
- public virtual async Task<IActionResult> ContactUs(
+ public virtual async Task<IActionResult> Index(
[FromServices] StoreInformationSettings storeInformationSettings,
[FromServices] IPageService pageService,
ContactUsModel model)
diff --git a/src/Web/Grand.Web/Endpoints/EndpointProvider.cs b/src/Web/Grand.Web/Endpoints/EndpointProvider.cs
index 902d92ac2..5e9137e29 100644
--- a/src/Web/Grand.Web/Endpoints/EndpointProvider.cs
+++ b/src/Web/Grand.Web/Endpoints/EndpointProvider.cs
@@ -326,7 +326,7 @@ namespace Grand.Web.Endpoints
//contact us
endpointRouteBuilder.MapControllerRoute("ContactUs",
pattern + "contactus",
- new { controller = "Contact", action = "ContactUs" });
+ new { controller = "Contact", action = "Index" });
//change currency
endpointRouteBuilder.MapControllerRoute("ChangeCurrency",
diff --git a/src/Web/Grand.Web/Views/Contact/ContactUs.cshtml b/src/Web/Grand.Web/Views/Contact/Index.cshtml
similarity index 100%
rename from src/Web/Grand.Web/Views/Contact/ContactUs.cshtml
rename to src/Web/Grand.Web/Views/Contact/Index.cshtml