aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorYohan Boniface <yohanboniface@free.fr>2019-04-09 11:02:02 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-04-09 11:02:02 +0200
commitc100a6142e6571312db9f6407698a21a08b593fb (patch)
treec80ac9c7754b8f5b133255e003557937e415ee23 /server/helpers
parent8ce1ba6e3efe0a688d6a0b57e8201cde33ad7aac (diff)
downloadPeerTube-c100a6142e6571312db9f6407698a21a08b593fb.tar.gz
PeerTube-c100a6142e6571312db9f6407698a21a08b593fb.tar.zst
PeerTube-c100a6142e6571312db9f6407698a21a08b593fb.zip
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
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/custom-validators/video-rates.ts5
1 files changed, 5 insertions, 0 deletions
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 @@
1function isRatingValid (value: any) {
2 return value === 'like' || value === 'dislike'
3}
4
5export { isRatingValid }