From 197239daa9cf1b2dc9a8af68b1cdd722e22bcfce Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Wed, 15 Feb 2023 13:13:36 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=BF=98=E8=A8=98=E5=AF=86=E7=A2=BC?= =?UTF-8?q?=20[WHY]=20=E9=96=8B=E7=99=BC=20ShowEasy=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 返回url帶參數Email --- EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs | 6 ++++-- EuroTran/WebApp/Controllers/SignupController.cs | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs index 5f4ae35..cf6fdae 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/SignupService.cs @@ -416,7 +416,7 @@ namespace EasyBL.WEBAPP.SYS StringBuilder sb = new StringBuilder(); EmailTemplate_CH mailTemplate = new EmailTemplate_CH(); - var Server = Common.ConfigGetValue("", "ida:SERVER"); + var Server = Common.ConfigGetValue("", "ida:RedirectUri"); sb.Append(mailTemplate.MailHeader()); @@ -473,7 +473,9 @@ namespace EasyBL.WEBAPP.SYS sb.Append(""); sb.Append(""); sb.Append(""); sb.Append("重設密碼"); sb.Append(""); @@ -566,7 +568,7 @@ namespace EasyBL.WEBAPP.SYS StringBuilder sb = new StringBuilder(); EmailTemplate_CH mailTemplate = new EmailTemplate_CH(); - var Server = Common.ConfigGetValue("", "ida:SERVER"); + var Server = Common.ConfigGetValue("", "ida:RedirectUri"); sb.Append(mailTemplate.MailHeader()); diff --git a/EuroTran/WebApp/Controllers/SignupController.cs b/EuroTran/WebApp/Controllers/SignupController.cs index 57d25f7..ae98217 100644 --- a/EuroTran/WebApp/Controllers/SignupController.cs +++ b/EuroTran/WebApp/Controllers/SignupController.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; +using System.Net.Http.Headers; using System.Web.Http; namespace WebApp.Controllers @@ -68,12 +69,14 @@ namespace WebApp.Controllers { var result = new SignupService().ResetPage(Email); - var Server = Common.ConfigGetValue("", "ida:WebsiteUri"); + var Server = Common.ConfigGetValue("", "ida:WebsiteUri"); + //var Server = "http://localhost:3000"; if (result.ReasonPhrase == "OK") { result = Request.CreateResponse(HttpStatusCode.Moved); - result.Headers.Location = new Uri(Server + "/user/forgot"); //在API Header加入要導向的Location Url + result.Headers.Location = new Uri(Server + "/user/forgot?Email=" + Email); //在API Header加入要導向的Location Url + } return result;