|
@@ -89,7 +89,7 @@ func (c *BaseAuthController) ServeJSON(encoding ...bool) {
|
|
|
//requestBody, _ = url.QueryUnescape(string(c.Ctx.Input.RequestBody))
|
|
|
requestBody = string(c.Ctx.Input.RequestBody)
|
|
|
}
|
|
|
- if baseRes.Ret != 200 && baseRes.IsSendEmail {
|
|
|
+ if baseRes.Ret != 200 && baseRes.IsSendEmail && c.User != nil {
|
|
|
//go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"失败提醒", "URI:"+c.Ctx.Input.URI()+"<br/> "+"Params"+requestBody+" <br/>"+"ErrMsg:"+baseRes.ErrMsg+";<br/>Msg:"+baseRes.Msg+";<br/> Body:"+string(body)+"<br/>"+c.SysUser.RealName, utils.EmailSendToUsers)
|
|
|
body := "URI:" + c.Ctx.Input.URI() + "<br/> " + "Params" + requestBody + " <br/>" + "ErrMsg:" + baseRes.ErrMsg + ";<br/>Msg:" + baseRes.Msg + ";<br/> Body:" + string(body) + "<br/>" + c.User.RealName
|
|
|
// go alarm_msg.SendAlarmMsg(body, 1)
|