]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/feeds.ts
Disable openapi generation
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / feeds.ts
CommitLineData
244e76a5
RK
1import { exists } from './misc'
2
3function isValidRSSFeed (value: string) {
4 if (!exists(value)) return false
5
6 const feedExtensions = [
7 'xml',
8 'json',
9 'json1',
10 'rss',
11 'rss2',
12 'atom',
13 'atom1'
14 ]
15
bdd428a6 16 return feedExtensions.includes(value)
244e76a5
RK
17}
18
19// ---------------------------------------------------------------------------
20
21export {
22 isValidRSSFeed
23}