mirror of
https://github.com/jadolg/rocketchat-notification-action.git
synced 2026-10-03 01:30:45 +09:00
Logout at the end of the script
This commit is contained in:
@@ -47,3 +47,14 @@ if [ "$SUCCESS" != "true" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}${BOLD}✓ Message sent${RESET} — channel: ${BOLD}${CHANNEL_NAME}${RESET}, sender: ${SENDER}, id: ${MSG_ID}"
|
echo -e "${GREEN}${BOLD}✓ Message sent${RESET} — channel: ${BOLD}${CHANNEL_NAME}${RESET}, sender: ${SENDER}, id: ${MSG_ID}"
|
||||||
|
|
||||||
|
LOGOUT_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
|
||||||
|
-H "X-Auth-Token: ${AUTH_TOKEN}" \
|
||||||
|
-H "X-User-Id: ${USER_ID}" \
|
||||||
|
"${SERVER}/api/v1/logout") || true
|
||||||
|
|
||||||
|
if [ "${LOGOUT_STATUS}" = "200" ]; then
|
||||||
|
echo -e "${GREEN}✓ Logged out${RESET}"
|
||||||
|
else
|
||||||
|
echo -e "${RED}✗ Logout failed${RESET} — HTTP ${LOGOUT_STATUS}"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user