1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Follow works

This commit is contained in:
Chocobozzz 2017-11-14 17:31:26 +01:00
parent e34c85e527
commit 350e31d6b6
No known key found for this signature in database
GPG key ID: 583A612D890159BE
39 changed files with 431 additions and 169 deletions

View file

@ -1,8 +1,8 @@
import * as config from 'config'
import { promisify0 } from '../helpers/core-utils'
import { OAuthClientModel } from '../models/oauth/oauth-client-interface'
import { UserModel } from '../models/account/user-interface'
import { ApplicationModel } from '../models/application/application-interface'
import { OAuthClientModel } from '../models/oauth/oauth-client-interface'
// Some checks on configuration files
function checkConfig () {
@ -70,6 +70,13 @@ async function usersExist (User: UserModel) {
return totalUsers !== 0
}
// We get db by param to not import it in this file (import orders)
async function applicationExist (Application: ApplicationModel) {
const totalApplication = await Application.countTotal()
return totalApplication !== 0
}
// ---------------------------------------------------------------------------
export {
@ -77,5 +84,6 @@ export {
checkFFmpeg,
checkMissedConfig,
clientsExist,
usersExist
usersExist,
applicationExist
}