aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-08 04:00:12 +0300
committerZephyrrus <[email protected]>2020-07-08 04:00:12 +0300
commitad852de51a0d2dd5d29c08838d5a430c58849e74 (patch)
treea4ab9a720f66271c9eba10916061a9b06c43656e /src/api/structures
parentrefactor: refactor grid to use vuex for every action (diff)
downloadhost.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.tar.xz
host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.zip
chore: linter the entire project using the new rules
Diffstat (limited to 'src/api/structures')
-rw-r--r--src/api/structures/Route.js8
-rw-r--r--src/api/structures/Server.js1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/api/structures/Route.js b/src/api/structures/Route.js
index c2ad32e..400ae3d 100644
--- a/src/api/structures/Route.js
+++ b/src/api/structures/Route.js
@@ -55,7 +55,8 @@ class Route {
if (banned) return res.status(401).json({ message: 'This IP has been banned from using the service.' });
if (this.options.bypassAuth) return this.run(req, res, db);
- // The only reason I call it token here and not Api Key is to be backwards compatible with the uploader and sharex
+ // The only reason I call it token here and not Api Key is to be backwards compatible
+ // with the uploader and sharex
// Small price to pay.
if (req.headers.token) return this.authorizeApiKey(req, res, req.headers.token);
if (!req.headers.authorization) return res.status(401).json({ message: 'No authorization header provided' });
@@ -96,10 +97,7 @@ class Route {
return this.run(req, res, db, user);
}
- run(req, res, db) {
- // eslint-disable-line no-unused-vars
-
- }
+ run() {}
error(res, error) {
log.error(error);
diff --git a/src/api/structures/Server.js b/src/api/structures/Server.js
index 5d2290b..c8537fb 100644
--- a/src/api/structures/Server.js
+++ b/src/api/structures/Server.js
@@ -11,6 +11,7 @@ const morgan = require('morgan');
const log = require('../utils/Log');
const ThumbUtil = require('../utils/ThumbUtil');
+// eslint-disable-next-line no-unused-vars
const rateLimiter = new RateLimit({
windowMs: parseInt(process.env.RATE_LIMIT_WINDOW, 10),
max: parseInt(process.env.RATE_LIMIT_MAX, 10),