aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/metrics.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/metrics.ts')
-rw-r--r--server/middlewares/validators/metrics.ts3
1 files changed, 0 insertions, 3 deletions
diff --git a/server/middlewares/validators/metrics.ts b/server/middlewares/validators/metrics.ts
index cd6f872da..8ee5ac0d0 100644
--- a/server/middlewares/validators/metrics.ts
+++ b/server/middlewares/validators/metrics.ts
@@ -4,7 +4,6 @@ import { isValidPlayerMode } from '@server/helpers/custom-validators/metrics'
4import { isIdOrUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' 4import { isIdOrUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc'
5import { CONFIG } from '@server/initializers/config' 5import { CONFIG } from '@server/initializers/config'
6import { HttpStatusCode, PlaybackMetricCreate } from '@shared/models' 6import { HttpStatusCode, PlaybackMetricCreate } from '@shared/models'
7import { logger } from '../../helpers/logger'
8import { areValidationErrors, doesVideoExist } from './shared' 7import { areValidationErrors, doesVideoExist } from './shared'
9 8
10const addPlaybackMetricValidator = [ 9const addPlaybackMetricValidator = [
@@ -35,8 +34,6 @@ const addPlaybackMetricValidator = [
35 .custom(isIdOrUUIDValid), 34 .custom(isIdOrUUIDValid),
36 35
37 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 36 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
38 logger.debug('Checking addPlaybackMetricValidator parameters.', { parameters: req.query })
39
40 if (!CONFIG.OPEN_TELEMETRY.METRICS.ENABLED) return res.sendStatus(HttpStatusCode.NO_CONTENT_204) 37 if (!CONFIG.OPEN_TELEMETRY.METRICS.ENABLED) return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
41 38
42 const body: PlaybackMetricCreate = req.body 39 const body: PlaybackMetricCreate = req.body