replace terminology in log messages and such

This commit is contained in:
hippoz 2021-09-06 19:46:09 +03:00
parent 8a63040fdb
commit 680aab399b
Signed by untrusted user who does not match committer: hippoz
GPG key ID: 7C52899193467641
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,5 @@
module.exports = { module.exports = {
"env": { "env": {
"browser": true,
"commonjs": true, "commonjs": true,
"es2021": true, "es2021": true,
"node": true "node": true

View file

@ -10,7 +10,7 @@ class RateLimiter {
} }
} }
RateLimiter.prototype.consoom = function(discriminator) { RateLimiter.prototype.consume = function(discriminator) {
if (!this._flooding[discriminator]) this._flooding[discriminator] = { points: this.points, lastReset: Date.now() }; if (!this._flooding[discriminator]) this._flooding[discriminator] = { points: this.points, lastReset: Date.now() };
if (Math.abs(new Date() - this._flooding[discriminator].lastReset) >= this.time) { if (Math.abs(new Date() - this._flooding[discriminator].lastReset) >= this.time) {

View file

@ -30,10 +30,10 @@ app.use("/api/v1", apiRoute);
app.use(express.static("app")); app.use(express.static("app"));
app.use((err, req, res, next) => { app.use((err, req, res, next) => {
console.error("error: Internal server error", err); console.error("error: server: internal server error", err);
res.status(500).json({ error: true, status: 500, message: "ERR_INTERNAL_SERVER_ERROR" }); res.status(500).json({ error: true, status: 500, message: "ERR_INTERNAL_SERVER_ERROR" });
}); });
httpServer.listen(config.ports.mainServerPort, () => { httpServer.listen(config.ports.mainServerPort, () => {
console.log(`[*] [server] Main server is listening on port ${config.ports.mainServerPort}`); console.log(`server: listening on port ${config.ports.mainServerPort}`);
}); });