Commit b8d4d532 authored by hyeryung's avatar hyeryung

add check login

parent b578a681
Pipeline #20751 passed with stages
in 1 minute and 48 seconds
// eslint-disable-next-line no-undef /* eslint-disable no-undef */
function removeSecretNav () {
const elements = document.getElementsByClassName('secret-nav')
while (elements.length > 0) {
elements[0].parentNode.removeChild(elements[0])
}
}
fetch('/web/dms/api/auth/status') fetch('/web/dms/api/auth/status')
.then((response) => { .then((response) => {
if (response.url === 'https://swlab.bwg.co.kr/web/dms/login') { if (response.url === 'https://swlab.bwg.co.kr/web/dms/login') {
const elements = document.getElementsByClassName('secret-nav') removeSecretNav()
while (elements.length > 0) {
elements[0].parentNode.removeChild(elements[0])
}
} }
}) })
.catch((error) => { .catch((error) => {
console.error('Error checking login status:', error) console.error('Error checking login status:', error)
removeSecretNav()
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment