aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-11 15:38:53 +0200
committerChocobozzz <me@florianbigard.com>2019-04-11 15:38:53 +0200
commit8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98 (patch)
treee04f1da52f9377cf6ce820425c0de6e57ab57fc6 /server/helpers
parent76062d9f96e06a23a2efc8a727ea9c5394d21466 (diff)
downloadPeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.tar.gz
PeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.tar.zst
PeerTube-8f0bc73d7d5f4c88cbc5588a0ece12b3855c8f98.zip
Add ability to limit videos history size
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/core-utils.ts2
-rw-r--r--server/helpers/custom-validators/videos.ts3
2 files changed, 3 insertions, 2 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts
index f6d90bfca..305d3b71e 100644
--- a/server/helpers/core-utils.ts
+++ b/server/helpers/core-utils.ts
@@ -40,7 +40,7 @@ const timeTable = {
40 month: 3600000 * 24 * 30 40 month: 3600000 * 24 * 30
41} 41}
42 42
43export function parseDuration (duration: number | string): number { 43export function parseDurationToMs (duration: number | string): number {
44 if (typeof duration === 'number') return duration 44 if (typeof duration === 'number') return duration
45 45
46 if (typeof duration === 'string') { 46 if (typeof duration === 'string') {
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index eb08ae4ad..214db17a1 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -5,7 +5,8 @@ import 'multer'
5import * as validator from 'validator' 5import * as validator from 'validator'
6import { UserRight, VideoFilter, VideoPrivacy, VideoRateType } from '../../../shared' 6import { UserRight, VideoFilter, VideoPrivacy, VideoRateType } from '../../../shared'
7import { 7import {
8 CONSTRAINTS_FIELDS, MIMETYPES, 8 CONSTRAINTS_FIELDS,
9 MIMETYPES,
9 VIDEO_CATEGORIES, 10 VIDEO_CATEGORIES,
10 VIDEO_LICENCES, 11 VIDEO_LICENCES,
11 VIDEO_PRIVACIES, 12 VIDEO_PRIVACIES,