correction webhook
This commit is contained in:
+11
-5
@@ -858,11 +858,17 @@ 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}"
|
||||
|
||||
Reference in New Issue
Block a user