Skip to content
This repository was archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
fix launching private
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Apr 28, 2022
1 parent b70fdd7 commit 69c4320
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
10 changes: 8 additions & 2 deletions resources/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 69c4320

Please sign in to comment.