mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-04 17:35:15 +00:00
Properly wrap debug calls
This commit is contained in:
@@ -3,7 +3,7 @@ import internalAccessList from "../../internal/access-list.js";
|
||||
import jwtdecode from "../../lib/express/jwt-decode.js";
|
||||
import apiValidator from "../../lib/validator/api.js";
|
||||
import validator from "../../lib/validator/index.js";
|
||||
import { express as logger } from "../../logger.js";
|
||||
import { debug, express as logger } from "../../logger.js";
|
||||
import { getValidationSchema } from "../../schema/index.js";
|
||||
|
||||
const router = express.Router({
|
||||
@@ -49,7 +49,7 @@ router
|
||||
const rows = await internalAccessList.getAll(res.locals.access, data.expand, data.query);
|
||||
res.status(200).send(rows);
|
||||
} catch (err) {
|
||||
logger.debug(`${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
})
|
||||
@@ -65,7 +65,7 @@ router
|
||||
const result = await internalAccessList.create(res.locals.access, payload);
|
||||
res.status(201).send(result);
|
||||
} catch (err) {
|
||||
logger.debug(`${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
@@ -113,7 +113,7 @@ router
|
||||
});
|
||||
res.status(200).send(row);
|
||||
} catch (err) {
|
||||
logger.debug(`${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
})
|
||||
@@ -130,7 +130,7 @@ router
|
||||
const result = await internalAccessList.update(res.locals.access, payload);
|
||||
res.status(200).send(result);
|
||||
} catch (err) {
|
||||
logger.debug(`${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
})
|
||||
@@ -147,7 +147,7 @@ router
|
||||
});
|
||||
res.status(200).send(result);
|
||||
} catch (err) {
|
||||
logger.debug(`${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
debug(logger, `${req.method.toUpperCase()} ${req.path}: ${err}`);
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user