mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add check constraints live tests
This commit is contained in:
parent
af4ae64f6f
commit
97969c4edf
13 changed files with 229 additions and 37 deletions
|
@ -18,8 +18,6 @@ import { Redis } from './redis'
|
|||
import { createLocalVideoChannel } from './video-channel'
|
||||
import { createWatchLaterPlaylist } from './video-playlist'
|
||||
|
||||
import memoizee = require('memoizee')
|
||||
|
||||
type ChannelNames = { name: string, displayName: string }
|
||||
|
||||
async function createUserAccountAndChannelAndPlaylist (parameters: {
|
||||
|
@ -152,8 +150,8 @@ async function isAbleToUploadVideo (userId: number, size: number) {
|
|||
if (user.videoQuota === -1 && user.videoQuotaDaily === -1) return Promise.resolve(true)
|
||||
|
||||
const [ totalBytes, totalBytesDaily ] = await Promise.all([
|
||||
getOriginalVideoFileTotalFromUser(user.id),
|
||||
getOriginalVideoFileTotalDailyFromUser(user.id)
|
||||
getOriginalVideoFileTotalFromUser(user),
|
||||
getOriginalVideoFileTotalDailyFromUser(user)
|
||||
])
|
||||
|
||||
const uploadedTotal = size + totalBytes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue