1
0
Fork 0
peertube/server/helpers/custom-validators/follows.ts

14 lines
333 B
TypeScript

import { exists } from './misc'
import { FollowState } from '@shared/models'
function isFollowStateValid (value: FollowState) {
if (!exists(value)) return false
return value === 'pending' || value === 'accepted'
}
// ---------------------------------------------------------------------------
export {
isFollowStateValid
}