Linter: Fix all lint errors

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-02-15 09:42:51 +01:00
parent b0a45bdf9c
commit 136d895d15
51 changed files with 2245 additions and 1539 deletions

View file

@ -25,11 +25,11 @@ statusRouter.get('/status', function (req, res, next) {
})
// get status
statusRouter.get('/temp', function (req, res) {
var host = req.get('host')
const host = req.get('host')
if (config.allowOrigin.indexOf(host) === -1) {
errors.errorForbidden(res)
} else {
var tempid = req.query.tempid
const tempid = req.query.tempid
if (!tempid) {
errors.errorForbidden(res)
} else {
@ -60,11 +60,11 @@ statusRouter.get('/temp', function (req, res) {
})
// post status
statusRouter.post('/temp', urlencodedParser, function (req, res) {
var host = req.get('host')
const host = req.get('host')
if (config.allowOrigin.indexOf(host) === -1) {
errors.errorForbidden(res)
} else {
var data = req.body.data
const data = req.body.data
if (!data) {
errors.errorForbidden(res)
} else {
@ -90,7 +90,7 @@ statusRouter.post('/temp', urlencodedParser, function (req, res) {
})
statusRouter.get('/config', function (req, res) {
var data = {
const data = {
domain: config.domain,
urlpath: config.urlPath,
debug: config.debug,