From 9292ce8a91dde3fc9c3b67c12ed54286136aa099 Mon Sep 17 00:00:00 2001 From: didier Date: Sun, 9 Aug 2026 21:08:21 +0200 Subject: [PATCH] correction suppression mattermost --- bin/gestUsers.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/gestUsers.sh b/bin/gestUsers.sh index fccf947..32bfd61 100755 --- a/bin/gestUsers.sh +++ b/bin/gestUsers.sh @@ -297,15 +297,15 @@ searchDestroy() { #################################################################################################################### if [ "${DOMAINE_EN_COURS}" = "${domain}" ] then - REP_SEARCH=$(searchMattermost $REP_SEARCH_DESTROY) - if [ ! -z ${REP_SEARCH} ] + MM_USER_ID=$(searchMattermost $REP_SEARCH_DESTROY) + if [ ! -z ${MM_USER_ID} ] then echo -e "${RED} suppression de ${REP_SEARCH_DESTROY} trouvé dans mattermost ${NC}" - status_del=$(curl --request DELETE \ - -w "%{status}" \ + status_del=$(curl -s --request DELETE \ + --header 'Accept: application/json' \ -H "Authorization: Bearer ${mattermost_token}" \ - "${URL_AGORA_API}/api/v4/users/${REP_SEARCH_DESTROY}") - if [ "${status_del}" -eq "200" ] + "${URL_AGORA_API}/api/v4/users/${MM_USER_ID}") + if [ "$(echo ${status_del} | jq -r .status)" -eq "200" ] then printKazMsg "Suppresion ok" else