From 34af74b28885e79123c30f17bc5bb8a9d2956929 Mon Sep 17 00:00:00 2001 From: d11n Date: Thu, 28 Jan 2021 11:58:07 +0100 Subject: [PATCH] Apply URL changes from code review Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri Update BTCPayServer/Controllers/AccountController.cs Co-authored-by: Andrew Camilleri --- BTCPayServer/Controllers/AccountController.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/BTCPayServer/Controllers/AccountController.cs b/BTCPayServer/Controllers/AccountController.cs index 1665212c2..63e7dbc12 100644 --- a/BTCPayServer/Controllers/AccountController.cs +++ b/BTCPayServer/Controllers/AccountController.cs @@ -66,7 +66,8 @@ namespace BTCPayServer.Controllers [HttpGet] [AllowAnonymous] - [Route("/login")] + [Route("~/login", Order = 1)] + [Route("~/Account/Login", Order = 2)] public async Task Login(string returnUrl = null, string email = null) { @@ -90,7 +91,8 @@ namespace BTCPayServer.Controllers [HttpPost] [AllowAnonymous] - [Route("/login")] + [Route("~/login", Order = 1)] + [Route("~/Account/Login", Order = 2)] [ValidateAntiForgeryToken] [RateLimitsFilter(ZoneLimits.Login, Scope = RateLimitsScope.RemoteAddress)] public async Task Login(LoginViewModel model, string returnUrl = null) @@ -398,7 +400,8 @@ namespace BTCPayServer.Controllers [HttpGet] [AllowAnonymous] - [Route("/register")] + [Route("~/register", Order = 1)] + [Route("~/Account/Register", Order = 2)] [RateLimitsFilter(ZoneLimits.Register, Scope = RateLimitsScope.RemoteAddress)] public async Task Register(string returnUrl = null, bool logon = true) { @@ -416,7 +419,8 @@ namespace BTCPayServer.Controllers [HttpPost] [AllowAnonymous] - [Route("/register")] + [Route("~/register", Order = 1)] + [Route("~/Account/Register", Order = 2)] [ValidateAntiForgeryToken] public async Task Register(RegisterViewModel model, string returnUrl = null, bool logon = true) { @@ -483,7 +487,6 @@ namespace BTCPayServer.Controllers public bool RegisteredAdmin { get; set; } [HttpGet] - [Route("/logout")] public async Task Logout() { await _signInManager.SignOutAsync(); @@ -532,7 +535,6 @@ namespace BTCPayServer.Controllers [HttpGet] [AllowAnonymous] - [Route("/forgot-password")] public IActionResult ForgotPassword() { return View(); @@ -540,7 +542,6 @@ namespace BTCPayServer.Controllers [HttpPost] [AllowAnonymous] - [Route("/forgot-password")] [ValidateAntiForgeryToken] public async Task ForgotPassword(ForgotPasswordViewModel model) {