correction suppression mattermost

This commit is contained in:
2026-08-09 21:08:21 +02:00
parent 88d3bf72b9
commit 9292ce8a91
+6 -6
View File
@@ -297,15 +297,15 @@ searchDestroy() {
#################################################################################################################### ####################################################################################################################
if [ "${DOMAINE_EN_COURS}" = "${domain}" ] if [ "${DOMAINE_EN_COURS}" = "${domain}" ]
then then
REP_SEARCH=$(searchMattermost $REP_SEARCH_DESTROY) MM_USER_ID=$(searchMattermost $REP_SEARCH_DESTROY)
if [ ! -z ${REP_SEARCH} ] if [ ! -z ${MM_USER_ID} ]
then then
echo -e "${RED} suppression de ${REP_SEARCH_DESTROY} trouvé dans mattermost ${NC}" echo -e "${RED} suppression de ${REP_SEARCH_DESTROY} trouvé dans mattermost ${NC}"
status_del=$(curl --request DELETE \ status_del=$(curl -s --request DELETE \
-w "%{status}" \ --header 'Accept: application/json' \
-H "Authorization: Bearer ${mattermost_token}" \ -H "Authorization: Bearer ${mattermost_token}" \
"${URL_AGORA_API}/api/v4/users/${REP_SEARCH_DESTROY}") "${URL_AGORA_API}/api/v4/users/${MM_USER_ID}")
if [ "${status_del}" -eq "200" ] if [ "$(echo ${status_del} | jq -r .status)" -eq "200" ]
then then
printKazMsg "Suppresion ok" printKazMsg "Suppresion ok"
else else