add cache reset
This commit is contained in:
parent
41d57a8b18
commit
64c8536af2
@ -1,3 +1,5 @@
|
||||
version: ~
|
||||
|
||||
database:
|
||||
connection: postgres://mg_telegram:mg_telegram@postgres:5432/mg_telegram?sslmode=disable
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
version: ~
|
||||
|
||||
database:
|
||||
connection: postgres://mg_telegram_test:mg_telegram_test@postgres_test:5432/mg_telegram_test?sslmode=disable
|
||||
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
|
||||
// TransportConfig struct
|
||||
type TransportConfig struct {
|
||||
Version string `yaml:"version"`
|
||||
LogLevel logging.Level `yaml:"log_level"`
|
||||
Database DatabaseConfig `yaml:"database"`
|
||||
SentryDSN string `yaml:"sentry_dsn"`
|
||||
|
@ -50,6 +50,7 @@ func getLocalizedTemplateMessage(messageID string, templateData map[string]inter
|
||||
|
||||
func getLocale() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"Version": config.Version,
|
||||
"ButtonSave": getLocalizedMessage("button_save"),
|
||||
"ApiKey": getLocalizedMessage("api_key"),
|
||||
"TabSettings": getLocalizedMessage("tab_settings"),
|
||||
|
@ -431,7 +431,10 @@ func telegramWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler request: %v", update)
|
||||
logger.Debugf(
|
||||
"mgWebhookHandler request:\nUpdateID: %v,\nMessage: %+v,\nEditedMessage: %+v",
|
||||
update.UpdateID, update.Message, update.EditedMessage,
|
||||
)
|
||||
}
|
||||
|
||||
var client = v1.New(conn.MGURL, conn.MGToken)
|
||||
@ -486,7 +489,7 @@ func telegramWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("telegramWebhookHandler user %v", user)
|
||||
logger.Debugf("telegramWebhookHandler user %+v", user)
|
||||
}
|
||||
|
||||
snd := v1.SendData{
|
||||
@ -519,7 +522,7 @@ func telegramWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("telegramWebhookHandler Type: SendMessage, Bot: %v, Message: %v, Response: %v", b.ID, snd, data)
|
||||
logger.Debugf("telegramWebhookHandler Type: SendMessage, Bot: %v, Message: %+v, Response: %+v", b.ID, snd, data)
|
||||
}
|
||||
}
|
||||
|
||||
@ -575,7 +578,7 @@ func mgWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler request: %v", msg)
|
||||
logger.Debugf("mgWebhookHandler request: %+v", msg)
|
||||
}
|
||||
|
||||
uid, _ := strconv.Atoi(msg.Data.ExternalMessageID)
|
||||
@ -649,7 +652,7 @@ func mgWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler sent %v", msgSend)
|
||||
logger.Debugf("mgWebhookHandler sent %+v", msgSend)
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{"external_message_id": strconv.Itoa(msgSend.MessageID)})
|
||||
@ -663,7 +666,7 @@ func mgWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler update %v", msgSend)
|
||||
logger.Debugf("mgWebhookHandler update %+v", msgSend)
|
||||
}
|
||||
|
||||
c.AbortWithStatus(http.StatusOK)
|
||||
@ -677,7 +680,7 @@ func mgWebhookHandler(c *gin.Context) {
|
||||
}
|
||||
|
||||
if config.Debug {
|
||||
logger.Debugf("mgWebhookHandler delete %v", msgSend)
|
||||
logger.Debugf("mgWebhookHandler delete %+v", msgSend)
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{})
|
||||
|
@ -6,7 +6,7 @@
|
||||
<link rel="stylesheet" href="/static/font.css" >
|
||||
<link rel="stylesheet" href="/static/jquery-confirm.min.css">
|
||||
<link rel="stylesheet" href="/static/materialize.min.css">
|
||||
<link rel="stylesheet" href="/static/style.css" >
|
||||
<link rel="stylesheet" href="/static/style.css?{{.Locale.Version}}" >
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
@ -32,6 +32,6 @@
|
||||
<script src="/static/jquery-3.3.1.min.js"></script>
|
||||
<script src="/static/materialize.min.js"></script>
|
||||
<script src="/static/jquery-confirm.min.js"></script>
|
||||
<script src="/static/script.js"></script>
|
||||
<script src="/static/script.js?{{.Locale.Version}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -4,6 +4,7 @@ tab_bots: Bots
|
||||
table_name: Nombre
|
||||
table_token: Token
|
||||
table_activity: Marca de Actividad
|
||||
table_delete: Delete
|
||||
api_key: API key
|
||||
add_bot: Añadir un bot
|
||||
title: Múdulo de conexión de Telegram a retailCRM
|
||||
|
Loading…
Reference in New Issue
Block a user