aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/follows.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
committerChocobozzz <me@florianbigard.com>2019-11-28 11:37:32 +0100
commitb8f4167fb6fa448125aeecff80b201d74e27fe6a (patch)
tree33179fe38e113b3bd88bae9782f4741754a85159 /server/helpers/custom-validators/follows.ts
parentd275e75453015352d5b9387eaf5078e1ba5e0ea2 (diff)
downloadPeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.gz
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.tar.zst
PeerTube-b8f4167fb6fa448125aeecff80b201d74e27fe6a.zip
Only display accepted followers/followings in about page
Diffstat (limited to 'server/helpers/custom-validators/follows.ts')
-rw-r--r--server/helpers/custom-validators/follows.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/follows.ts b/server/helpers/custom-validators/follows.ts
new file mode 100644
index 000000000..fbef7ad87
--- /dev/null
+++ b/server/helpers/custom-validators/follows.ts
@@ -0,0 +1,14 @@
1import { exists } from './misc'
2import { FollowState } from '@shared/models'
3
4function isFollowStateValid (value: FollowState) {
5 if (!exists(value)) return false
6
7 return value === 'pending' || value === 'accepted'
8}
9
10// ---------------------------------------------------------------------------
11
12export {
13 isFollowStateValid
14}