aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-23 17:53:38 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commit8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1 (patch)
tree078708f8316ed6294088b159f79e861664fca953 /server/helpers/custom-validators/accounts.ts
parent39445ead45aaaea801ec09991b8dd2464f722e47 (diff)
downloadPeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.tar.gz
PeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.tar.zst
PeerTube-8d468a16fd33ec2660c3c59b3f7def53eb0cc4a1.zip
Cleanup helpers
Diffstat (limited to 'server/helpers/custom-validators/accounts.ts')
-rw-r--r--server/helpers/custom-validators/accounts.ts7
1 files changed, 0 insertions, 7 deletions
diff --git a/server/helpers/custom-validators/accounts.ts b/server/helpers/custom-validators/accounts.ts
index 088d5fc8f..83540e545 100644
--- a/server/helpers/custom-validators/accounts.ts
+++ b/server/helpers/custom-validators/accounts.ts
@@ -14,12 +14,6 @@ function isAccountNameValid (value: string) {
14 return isUserUsernameValid(value) 14 return isUserUsernameValid(value)
15} 15}
16 16
17function isAccountNameWithHostValid (value: string) {
18 const [ name, host ] = value.split('@')
19
20 return isAccountNameValid(name) && isHostValid(host)
21}
22
23function checkVideoAccountExists (id: string, res: express.Response, callback: () => void) { 17function checkVideoAccountExists (id: string, res: express.Response, callback: () => void) {
24 let promise: Promise<AccountInstance> 18 let promise: Promise<AccountInstance>
25 if (validator.isInt(id)) { 19 if (validator.isInt(id)) {
@@ -48,6 +42,5 @@ function checkVideoAccountExists (id: string, res: express.Response, callback: (
48 42
49export { 43export {
50 checkVideoAccountExists, 44 checkVideoAccountExists,
51 isAccountNameWithHostValid,
52 isAccountNameValid 45 isAccountNameValid
53} 46}