mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 07:08:11 +00:00
fix launching private
This commit is contained in:
parent
b70fdd7ff6
commit
69c43200e7
@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="style/index.css" />
|
||||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
||||
<script src="js/neutralino.js"></script>
|
||||
<script src="js/windowDrag.js"></script>
|
||||
<script src="js/hoverEvt.js"></script>
|
||||
|
@ -296,13 +296,19 @@ async function openLogin() {
|
||||
const url = `${useHttps ? 'https' : 'http'}://${ip}:${port}`;
|
||||
|
||||
// Check if we even need to authenticate
|
||||
const { data } = await axios.get(url + '/grasscutter/auth_status')
|
||||
try {
|
||||
const { data } = await axios.get(url + '/grasscutter/auth_status')
|
||||
|
||||
if (data?.message !== 'AUTH_ENABLED') {
|
||||
if (data?.message !== 'AUTH_ENABLED') {
|
||||
launchPrivate()
|
||||
return
|
||||
}
|
||||
} catch(e) {
|
||||
launchPrivate()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
loginIpDisplay.innerText = ip
|
||||
registerIpDisplay.innerText = ip
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user