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
No known key found for this signature in database
GPG key ID: 7C52899193467641
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,5 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es2021": 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 (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((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" });
});
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}`);
});