1
0
Fork 0
peertube/server/helpers/custom-validators/activitypub/rate.ts
2021-03-03 10:08:08 +01:00

18 lines
476 B
TypeScript

import { isBaseActivityValid, isObjectValid } from './misc'
function isLikeActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Like') &&
isObjectValid(activity.object)
}
function isDislikeActivityValid (activity: any) {
return isBaseActivityValid(activity, 'Dislike') &&
isObjectValid(activity.object)
}
// ---------------------------------------------------------------------------
export {
isDislikeActivityValid,
isLikeActivityValid
}