(title, text, Fsurl, userEmail, logsign string)
| 20 | } |
| 21 | |
| 22 | func PostToFS(title, text, Fsurl, userEmail, logsign string) string { |
| 23 | open := beego.AppConfig.String("open-feishu") |
| 24 | if open != "1" { |
| 25 | logs.Info(logsign, "[feishu]", "飞书接口未配置未开启状态,请先配置open-feishu为1") |
| 26 | return "飞书接口未配置未开启状态,请先配置open-feishu为1" |
| 27 | } |
| 28 | RTstring := "" |
| 29 | if strings.Contains(Fsurl, "/v2/") { |
| 30 | RTstring = PostToFeiShuv2(title, text, Fsurl, userEmail, logsign) |
| 31 | } else { |
| 32 | RTstring = PostToFeiShu(title, text, Fsurl, logsign) |
| 33 | } |
| 34 | return RTstring |
| 35 | } |
| 36 | |
| 37 | func PostToFeiShu(title, text, Fsurl, logsign string) string { |
| 38 | u := FSMessage{Title: title, Text: text} |
no test coverage detected