vio spins
This commit is contained in:
parent
9e148c00cd
commit
d5b6594d4b
1 changed files with 7 additions and 1 deletions
8
index.js
8
index.js
|
@ -57,6 +57,10 @@ app.get("/v1/lanyard", (req, res) => {
|
|||
res.send(lanyardData)
|
||||
})
|
||||
|
||||
app.get("/v1/spins", (req, res) => {
|
||||
res.send(violetSpins)
|
||||
})
|
||||
|
||||
// app.listen(PORT, () => {
|
||||
// console.log("API is now listening on port 8080!")
|
||||
// })
|
||||
|
@ -130,9 +134,11 @@ wsServer.on("connection", function connection(socket) {
|
|||
}
|
||||
|
||||
socket.send(`{"op": 3}`)
|
||||
} else if (data.op == 4) {
|
||||
violetSpins += 1
|
||||
socket.send(`{"op": 4, "spins": ${violetSpins}}`)
|
||||
} else {
|
||||
console.log(data)
|
||||
violetSpins += 1
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue