From 075f16caac5236cb04c98ae7b3a989766d764bb3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2017 17:04:57 +0200 Subject: Remove "function" in favor of () => {} --- server/helpers/custom-validators/pods.ts | 2 +- server/helpers/custom-validators/remote/videos.ts | 6 +++--- server/helpers/custom-validators/videos.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/helpers/custom-validators') diff --git a/server/helpers/custom-validators/pods.ts b/server/helpers/custom-validators/pods.ts index ec9f26cc8..0519def52 100644 --- a/server/helpers/custom-validators/pods.ts +++ b/server/helpers/custom-validators/pods.ts @@ -9,7 +9,7 @@ function isHostValid (host: string) { function isEachUniqueHostValid (hosts: string[]) { return isArray(hosts) && hosts.length !== 0 && - hosts.every(function (host) { + hosts.every(host => { return isHostValid(host) && hosts.indexOf(host) === hosts.lastIndexOf(host) }) } diff --git a/server/helpers/custom-validators/remote/videos.ts b/server/helpers/custom-validators/remote/videos.ts index e14673cb3..b33d8c9be 100644 --- a/server/helpers/custom-validators/remote/videos.ts +++ b/server/helpers/custom-validators/remote/videos.ts @@ -33,7 +33,7 @@ const ENDPOINT_ACTIONS = REQUEST_ENDPOINT_ACTIONS[REQUEST_ENDPOINTS.VIDEOS] function isEachRemoteRequestVideosValid (requests: any[]) { return isArray(requests) && - requests.every(function (request) { + requests.every(request => { const video = request.data if (!video) return false @@ -63,7 +63,7 @@ function isEachRemoteRequestVideosValid (requests: any[]) { function isEachRemoteRequestVideosQaduValid (requests: any[]) { return isArray(requests) && - requests.every(function (request) { + requests.every(request => { const video = request.data if (!video) return false @@ -79,7 +79,7 @@ function isEachRemoteRequestVideosQaduValid (requests: any[]) { function isEachRemoteRequestVideosEventsValid (requests: any[]) { return isArray(requests) && - requests.every(function (request) { + requests.every(request => { const eventData = request.data if (!eventData) return false diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index e335b09d1..62132acb1 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts @@ -68,7 +68,7 @@ function isVideoNameValid (value: string) { function isVideoTagsValid (tags: string[]) { return isArray(tags) && validator.isInt(tags.length.toString(), VIDEOS_CONSTRAINTS_FIELDS.TAGS) && - tags.every(function (tag) { + tags.every(tag => { return exists(tag) && validator.isLength(tag, VIDEOS_CONSTRAINTS_FIELDS.TAG) }) } -- cgit v1.2.3