From c8e7cebfd676c652aa034a31a2c517a8fa3db671 Mon Sep 17 00:00:00 2001 From: Fab Date: Sun, 5 Jul 2026 19:38:36 +0200 Subject: [PATCH] correction webhook --- bin/createUser.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/createUser.sh b/bin/createUser.sh index cbcac8d..d921b3c 100755 --- a/bin/createUser.sh +++ b/bin/createUser.sh @@ -858,12 +858,18 @@ EOF" | tee -a "${CMD_MSG}" echo " # on envoie la confirmation d'inscription sur l'agora " | tee -a "${CMD_MSG}" #echo "docker exec -i mattermostServ bin/mmctl post create kaz:Creation-Comptes --message \"${MAIL_KAZ}\"" | tee -a "${CMD_MSG}" - cat <<'EOF' | tee -a "${CMD_MSG}" - curl -i -X POST -H 'Content-Type: application/json' \ - -d '{"channel": "creation-comptes","text": "${MAIL_KAZ}"}' \ - https://${URL_AGORA}/hooks/${token_webhook} -EOF + #pas réussi à le mettre dans CMD_MSG :(, je balance direct) + payload=$(jq -n \ + --arg channel "creation-comptes" \ + --arg text "$MAIL_KAZ" \ + '{channel: $channel, text: $text}') + + curl -i -X POST \ + -H "Content-Type: application/json" \ + -d "$payload" \ + "https://${URL_AGORA}/hooks/${token_webhook}" + # fin des inscriptions done <<< "${ALL_LINES}"