mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Cleanup helpers
This commit is contained in:
parent
39445ead45
commit
8d468a16fd
12 changed files with 57 additions and 169 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue