!isNaN(val.duration) &&
val.duration >= 0 &&
val.duration < constants.MAXIMUM_VIDEO_DURATION &&
+ validator.isLength(val.author, 1, constants.MAXIMUM_AUTHOR_LENGTH) &&
validator.isDate(val.createdDate)
})
}
// Time to wait between requests to the friends
let INTERVAL = 60000
+// Max length of the author username
+const MAXIMUM_AUTHOR_LENGTH = 20
// 2 hours maximum for the duration of a video (in seconds)
let MAXIMUM_VIDEO_DURATION = 7200
API_VERSION: API_VERSION,
FRIEND_BASE_SCORE: FRIEND_BASE_SCORE,
INTERVAL: INTERVAL,
+ MAXIMUM_AUTHOR_LENGTH: MAXIMUM_AUTHOR_LENGTH,
MAXIMUM_VIDEO_DURATION: MAXIMUM_VIDEO_DURATION,
PAGINATION_COUNT_DEFAULT: PAGINATION_COUNT_DEFAULT,
PODS_SCORE: PODS_SCORE,