aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-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}