Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-04-17 14:00:17 +02:00
9 changed files with 117 additions and 18 deletions
+4 -4
View File
@@ -107,15 +107,15 @@ app.get("/", authenticateToken, (request, response) => {
/* #swagger.security = [{
"bearerAuth": []
}] */
response.sendFile(path.join(__dirname, "structure.png"));
response.sendFile(path.join(__dirname, ".\\public\\home.html"));
});
app.post("/balance", authenticateToken, (request, response) => {
app.get("/balance", authenticateToken, (request, response) => {
/* #swagger.security = [{
"bearerAuth": []
}] */
const username = request.user.username;
console.log(username);
const allUsers = get_data();
const me = allUsers.find(u => u.username === username);
@@ -123,7 +123,7 @@ app.post("/balance", authenticateToken, (request, response) => {
return response.status(404).json({ error: "User not found" });
}
response.json({ balance: me.money });
response.json({ balance: me.money }).status(200);
});
app.post("/verify", authenticateToken, (request, response) => {