}
updateVideo (video: VideoEdit) {
- const language = video.language || undefined
- const licence = video.licence || undefined
- const category = video.category || undefined
- const description = video.description || undefined
+ const language = video.language || null
+ const licence = video.licence || null
+ const category = video.category || null
+ const description = video.description || null
const body: VideoUpdate = {
name: video.name,
description,
privacy: video.privacy,
tags: video.tags,
- nsfw: video.nsfw
+ nsfw: video.nsfw,
+ commentsEnabled: video.commentsEnabled
}
return this.authHttp.put(VideoService.BASE_VIDEO_URL + video.id, body)
return this.setVideoRate(id, 'dislike')
}
+ unsetVideoLike (id: number) {
+ return this.setVideoRate(id, 'none')
+ }
+
getUserVideoRating (id: number): Observable<UserVideoRate> {
const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating'