mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Remove unnecessary logs
This commit is contained in:
parent
2ec349aa85
commit
a85d530384
45 changed files with 46 additions and 352 deletions
|
@ -5,7 +5,6 @@ import { PluginType } from '../../../shared/models/plugins/plugin.type'
|
|||
import { InstallOrUpdatePlugin } from '../../../shared/models/plugins/server/api/install-plugin.model'
|
||||
import { exists, isBooleanValid, isSafePath, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
|
||||
import { isNpmPluginNameValid, isPluginNameValid, isPluginTypeValid, isPluginVersionValid } from '../../helpers/custom-validators/plugins'
|
||||
import { logger } from '../../helpers/logger'
|
||||
import { CONFIG } from '../../initializers/config'
|
||||
import { PluginManager } from '../../lib/plugins/plugin-manager'
|
||||
import { PluginModel } from '../../models/server/plugin'
|
||||
|
@ -26,8 +25,6 @@ const getPluginValidator = (pluginType: PluginType, withVersion = true) => {
|
|||
|
||||
return validators.concat([
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking getPluginValidator parameters', { parameters: req.params })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
const npmName = PluginModel.buildNpmName(req.params.pluginName, pluginType)
|
||||
|
@ -58,8 +55,6 @@ const getExternalAuthValidator = [
|
|||
.custom(exists),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking getExternalAuthValidator parameters', { parameters: req.params })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
const plugin = res.locals.registeredPlugin
|
||||
|
@ -89,8 +84,6 @@ const pluginStaticDirectoryValidator = [
|
|||
.custom(isSafePath),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking pluginStaticDirectoryValidator parameters', { parameters: req.params })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
return next()
|
||||
|
@ -108,8 +101,6 @@ const listPluginsValidator = [
|
|||
.custom(isBooleanValid),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking listPluginsValidator parameters', { parameters: req.query })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
return next()
|
||||
|
@ -128,8 +119,6 @@ const installOrUpdatePluginValidator = [
|
|||
.custom(isSafePath),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking installOrUpdatePluginValidator parameters', { parameters: req.body })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
const body: InstallOrUpdatePlugin = req.body
|
||||
|
@ -149,8 +138,6 @@ const uninstallPluginValidator = [
|
|||
.custom(isNpmPluginNameValid),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking uninstallPluginValidator parameters', { parameters: req.body })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
return next()
|
||||
|
@ -162,8 +149,6 @@ const existingPluginValidator = [
|
|||
.custom(isNpmPluginNameValid),
|
||||
|
||||
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking enabledPluginValidator parameters', { parameters: req.params })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
const plugin = await PluginModel.loadByNpmName(req.params.npmName)
|
||||
|
@ -184,8 +169,6 @@ const updatePluginSettingsValidator = [
|
|||
.exists(),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking enabledPluginValidator parameters', { parameters: req.body })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
return next()
|
||||
|
@ -205,8 +188,6 @@ const listAvailablePluginsValidator = [
|
|||
.custom(isPluginVersionValid),
|
||||
|
||||
(req: express.Request, res: express.Response, next: express.NextFunction) => {
|
||||
logger.debug('Checking enabledPluginValidator parameters', { parameters: req.query })
|
||||
|
||||
if (areValidationErrors(req, res)) return
|
||||
|
||||
if (CONFIG.PLUGINS.INDEX.ENABLED === false) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue