Skip to content

Commit 8091e74

Browse files
committed
perms were only there if they had any additional, so includes() freaked out, and removed some text from the main page
1 parent f14630f commit 8091e74

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

src/server.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ try {
2424
} catch (error) {
2525
console.error('Error when copying log file:', error);
2626
}
27-
console.log("--NAME-START--");
28-
console.log(logUtils.generateLogFileName());
29-
console.log("--NAME-END--");
3027

3128
const app = express();
3229
const HTTP_PORT = 8000;
@@ -78,6 +75,9 @@ app.use(handleMainRequest);
7875
(async () => {
7976
try {
8077
await clearLogFile(logFilePath);
78+
console.log("--NAME-START--");
79+
console.log(logUtils.generateLogFileName());
80+
console.log("--NAME-END--");
8181
startServer();
8282
} catch (error) {
8383
console.error('Initialization failed:', error);
@@ -200,14 +200,14 @@ async function handleApiRequest(req, res) {
200200
},
201201
'getGames': async () => {
202202
const base = db.data.games;
203-
const premium = db.users.permissions[user].includes('prem')
203+
const premium = db.users.permissions[user] ? db.users.permissions[user].includes('prem') : false
204204
? db.data.premiumGames
205205
: [];
206206
res.json([...base, ...premium]);
207207
},
208208
'getTools': async () => {
209209
const base = db.data.tools;
210-
const premium = db.users.permissions[user].includes('prem')
210+
const premium = db.users.permissions[user] ? db.users.permissions[user].includes('prem') : false
211211
? db.data.premiumTools
212212
: [];
213213
res.json([...base, ...premium]);

static/index.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<link rel="stylesheet" href="/code/index/style.css">
99
</head>
1010
<body>
11-
<h1>ZION IS THE OWNER OF WebGFA</h1>
1211
<script src="/code/index/main.js" type="module"></script>
1312
<div id="headerLogin">
1413
<h2>Login</h2>
@@ -22,10 +21,6 @@ <h2>Login</h2>
2221
<button type="submit">Login</button>
2322
</form>
2423
<button onclick="guestLogin()" id="guestLogin">Log in as a guest</button>
25-
<p>THE GUEST FEATURE IS BACK! IF YOU WANT A REAL ACCOUNT (NORMAL ACCOUNTS ARE FREE NOW), YOU CAN PUT AN ACCOUNT INTO CONSIDERATION AT THIS <a href='/register'>LINK</a></p>
26-
<!--<p>FOR THE GOOGLE ADS EMPLOYEES, USE USERNAME 'G-AD' AND PASSWORD 'G-AD'. ALL CAPS.
27-
You should also know that WebGFA won't be having these ads on the login / gameselect page. The ads will only be placed inside games. So please take that into consideration.
28-
</p>-->
2924
<p id="alertText"></p>
3025
</body>
3126
</html>

0 commit comments

Comments
 (0)