1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Cleanup helpers

This commit is contained in:
Chocobozzz 2017-11-23 17:53:38 +01:00
parent 39445ead45
commit 8d468a16fd
No known key found for this signature in database
GPG key ID: 583A612D890159BE
12 changed files with 57 additions and 169 deletions

View file

@ -14,12 +14,6 @@ function isAccountNameValid (value: string) {
return isUserUsernameValid(value)
}
function isAccountNameWithHostValid (value: string) {
const [ name, host ] = value.split('@')
return isAccountNameValid(name) && isHostValid(host)
}
function checkVideoAccountExists (id: string, res: express.Response, callback: () => void) {
let promise: Promise<AccountInstance>
if (validator.isInt(id)) {
@ -48,6 +42,5 @@ function checkVideoAccountExists (id: string, res: express.Response, callback: (
export {
checkVideoAccountExists,
isAccountNameWithHostValid,
isAccountNameValid
}