diff options
Diffstat (limited to 'server/helpers/custom-validators/activitypub/video-channels.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/video-channels.ts | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/server/helpers/custom-validators/activitypub/video-channels.ts b/server/helpers/custom-validators/activitypub/video-channels.ts deleted file mode 100644 index eb45c6372..000000000 --- a/server/helpers/custom-validators/activitypub/video-channels.ts +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | import { isDateValid, isUUIDValid } from '../misc' | ||
2 | import { isVideoChannelDescriptionValid, isVideoChannelNameValid } from '../video-channels' | ||
3 | import { isActivityPubUrlValid, isBaseActivityValid } from './misc' | ||
4 | |||
5 | function isVideoChannelUpdateActivityValid (activity: any) { | ||
6 | return isBaseActivityValid(activity, 'Update') && | ||
7 | isVideoChannelObjectValid(activity.object) | ||
8 | } | ||
9 | |||
10 | function isVideoChannelDeleteActivityValid (activity: any) { | ||
11 | return isBaseActivityValid(activity, 'Delete') | ||
12 | } | ||
13 | |||
14 | function isVideoChannelObjectValid (videoChannel: any) { | ||
15 | return videoChannel.type === 'VideoChannel' && | ||
16 | isActivityPubUrlValid(videoChannel.id) && | ||
17 | isVideoChannelNameValid(videoChannel.name) && | ||
18 | isVideoChannelDescriptionValid(videoChannel.content) && | ||
19 | isDateValid(videoChannel.published) && | ||
20 | isDateValid(videoChannel.updated) && | ||
21 | isUUIDValid(videoChannel.uuid) | ||
22 | } | ||
23 | |||
24 | // --------------------------------------------------------------------------- | ||
25 | |||
26 | export { | ||
27 | isVideoChannelUpdateActivityValid, | ||
28 | isVideoChannelDeleteActivityValid, | ||
29 | isVideoChannelObjectValid | ||
30 | } | ||