|
@@ -3,6 +3,7 @@ package daytask
|
|
|
import (
|
|
import (
|
|
|
"app/commons/model/entity"
|
|
"app/commons/model/entity"
|
|
|
"app/commons/services"
|
|
"app/commons/services"
|
|
|
|
|
+ "fmt"
|
|
|
"strings"
|
|
"strings"
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/gin-gonic/gin"
|
|
|
)
|
|
)
|
|
@@ -291,6 +292,14 @@ func (s *Server) OAuthConfig(c *gin.Context) {
|
|
|
result["zaloAppId"] = zaloConfig.Value
|
|
result["zaloAppId"] = zaloConfig.Value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 获取 Telegram Bot Name
|
|
|
|
|
+ var telegramConfig entity.DtConfig
|
|
|
|
|
+ if err := db.Where("`key` = ?", entity.ConfigKeyTelegramBotName).First(&telegramConfig).Error; err == nil {
|
|
|
|
|
+ result["telegramBotName"] = telegramConfig.Value
|
|
|
|
|
+ } else {
|
|
|
|
|
+ fmt.Printf("Telegram config error: %v, key: %s\n", err, entity.ConfigKeyTelegramBotName)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
ctx.OK(result)
|
|
ctx.OK(result)
|
|
|
}
|
|
}
|
|
|
|
|
|