diff --git a/backend/handlers/main.go b/backend/handlers/main.go index 8f2799a..1778af3 100644 --- a/backend/handlers/main.go +++ b/backend/handlers/main.go @@ -216,7 +216,7 @@ func WebhookHandler(db *gorm.DB) http.HandlerFunc { MessageID: msgID, Type: typeMsg, Content: content, - Direction: "inbound", + Direction: "Entrant", }) credit := MessageTypeCreditCost[typeMsg] @@ -243,7 +243,7 @@ func extractMessageContent(m map[string]interface{}) string { t := m["type"].(string) switch t { case "text": - return m["text"].(map[string]interface{})["body"].(string) + return m["Message reçu"].(map[string]interface{})["body"].(string) case "image", "video", "audio", "document", "sticker": return m[t].(map[string]interface{})["id"].(string) case "interactive": @@ -523,8 +523,8 @@ func HandleTemplateTest(db *gorm.DB) http.HandlerFunc { MessageID: messageID, Type: "template", Content: description, - Direction: "outbound", - Status: "sent", + Direction: "Sortant", + Status: "Envoyé", }) w.WriteHeader(resp.StatusCode) diff --git a/frontend/templates/sidebar.pages.tmpl b/frontend/templates/sidebar.pages.tmpl index 25350a4..97b2012 100644 --- a/frontend/templates/sidebar.pages.tmpl +++ b/frontend/templates/sidebar.pages.tmpl @@ -6,9 +6,9 @@ {{ if eq .User.Role "ADMIN" }}
  • 👤 Utilisateurs
  • -
  • 📤 Test envoi
  • -
  • 📤 Test envoi template
  • -
  • Api doc
  • + +
  • 📤 Test envoi via un template
  • +
  • 📚 API Doc
  • {{ end }}