PeerTube/server/helpers/custom-validators/activitypub/rate.ts

19 lines
476 B
TypeScript
Raw Normal View History

import { isBaseActivityValid, isObjectValid } from './misc'
function isLikeActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Like') &&
isObjectValid(activity.object)
}
2017-11-23 07:19:55 -06:00
function isDislikeActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Dislike') &&
isObjectValid(activity.object)
2017-11-23 07:19:55 -06:00
}
// ---------------------------------------------------------------------------
export {
isDislikeActivityValid,
isLikeActivityValid
2017-11-23 07:19:55 -06:00
}