Compare commits
No commits in common. "main" and "0.0.1-alpha" have entirely different histories.
main
...
0.0.1-alph
@ -1,11 +1,5 @@
|
||||
{
|
||||
"web": {
|
||||
"port": 8535
|
||||
},
|
||||
"launcher": {
|
||||
"whitelist": [
|
||||
|
||||
],
|
||||
"timestamp": "1746986400000"
|
||||
}
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
const utils = require("../../../modules/utils")
|
||||
const logger = require("../../../modules/logger")
|
||||
const express = require("express")
|
||||
const router = express()
|
||||
|
||||
router.get(":uuid", (req, res) => {
|
||||
const config = require("../../../config.json")
|
||||
if (config.launcher.whitelist.includes(req.params.uuid)) {
|
||||
res.status(200).json({
|
||||
success: true
|
||||
})
|
||||
}
|
||||
const currentTime = Date.now()
|
||||
if (currentTime > config.launcher.timestamp) {
|
||||
res.status(200).json({
|
||||
success: true,
|
||||
message: "OK"
|
||||
})
|
||||
} else {
|
||||
res.status(401).json({
|
||||
success: false,
|
||||
message: "Too early."
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
Loading…
x
Reference in New Issue
Block a user