This commit is contained in:
eson 2023-08-29 16:26:06 +08:00
parent 631a87abf1
commit a8c44f7206

View File

@ -143,6 +143,7 @@ func (l *UserEmailConfirmationLogic) UserEmailConfirmation(req *types.RequestEma
// 处理逻辑后 w,r 如:重定向, resp 必须重新处理 // 处理逻辑后 w,r 如:重定向, resp 必须重新处理
func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) { func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.Request, resp *basic.Response) {
if resp.Code == 200 {
successHtml := `<!DOCTYPE html> successHtml := `<!DOCTYPE html>
<html> <html>
<head> <head>
@ -162,4 +163,7 @@ func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.R
</html>` </html>`
w.Write([]byte(successHtml)) w.Write([]byte(successHtml))
httpx.OkJsonCtx(r.Context(), w, nil) httpx.OkJsonCtx(r.Context(), w, nil)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
} }