From c100a6142e6571312db9f6407698a21a08b593fb Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 9 Apr 2019 11:02:02 +0200 Subject: Add /accounts/:username/ratings endpoint (#1756) * Add /users/me/videos/ratings endpoint * Move ratings endpoint from users to accounts * /accounts/:name/ratings: add support for rating= and sort= * Restrict ratings list to owner * Wording and better way to ensure current account --- server/helpers/custom-validators/video-rates.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 server/helpers/custom-validators/video-rates.ts (limited to 'server/helpers') diff --git a/server/helpers/custom-validators/video-rates.ts b/server/helpers/custom-validators/video-rates.ts new file mode 100644 index 000000000..f2b6f7cae --- /dev/null +++ b/server/helpers/custom-validators/video-rates.ts @@ -0,0 +1,5 @@ +function isRatingValid (value: any) { + return value === 'like' || value === 'dislike' +} + +export { isRatingValid } -- cgit v1.2.3