aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/shared')
-rw-r--r--client/src/app/videos/shared/video-details.model.ts6
-rw-r--r--client/src/app/videos/shared/video.model.ts10
2 files changed, 8 insertions, 8 deletions
diff --git a/client/src/app/videos/shared/video-details.model.ts b/client/src/app/videos/shared/video-details.model.ts
index 84f96a25f..f4ae64dc1 100644
--- a/client/src/app/videos/shared/video-details.model.ts
+++ b/client/src/app/videos/shared/video-details.model.ts
@@ -10,7 +10,7 @@ import {
10} from '../../../../../shared' 10} from '../../../../../shared'
11 11
12export class VideoDetails extends Video implements VideoDetailsServerModel { 12export class VideoDetails extends Video implements VideoDetailsServerModel {
13 author: string 13 account: string
14 by: string 14 by: string
15 createdAt: Date 15 createdAt: Date
16 updatedAt: Date 16 updatedAt: Date
@@ -71,7 +71,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
71 } 71 }
72 72
73 isRemovableBy (user: AuthUser) { 73 isRemovableBy (user: AuthUser) {
74 return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO)) 74 return user && this.isLocal === true && (this.account === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
75 } 75 }
76 76
77 isBlackistableBy (user: AuthUser) { 77 isBlackistableBy (user: AuthUser) {
@@ -79,6 +79,6 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
79 } 79 }
80 80
81 isUpdatableBy (user: AuthUser) { 81 isUpdatableBy (user: AuthUser) {
82 return user && this.isLocal === true && user.username === this.author 82 return user && this.isLocal === true && user.username === this.account
83 } 83 }
84} 84}
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 7f2871032..2cad4a04e 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -2,7 +2,7 @@ import { Video as VideoServerModel } from '../../../../../shared'
2import { User } from '../../shared' 2import { User } from '../../shared'
3 3
4export class Video implements VideoServerModel { 4export class Video implements VideoServerModel {
5 author: string 5 account: string
6 by: string 6 by: string
7 createdAt: Date 7 createdAt: Date
8 updatedAt: Date 8 updatedAt: Date
@@ -32,8 +32,8 @@ export class Video implements VideoServerModel {
32 dislikes: number 32 dislikes: number
33 nsfw: boolean 33 nsfw: boolean
34 34
35 private static createByString (author: string, podHost: string) { 35 private static createByString (account: string, podHost: string) {
36 return author + '@' + podHost 36 return account + '@' + podHost
37 } 37 }
38 38
39 private static createDurationString (duration: number) { 39 private static createDurationString (duration: number) {
@@ -52,7 +52,7 @@ export class Video implements VideoServerModel {
52 absoluteAPIUrl = window.location.origin 52 absoluteAPIUrl = window.location.origin
53 } 53 }
54 54
55 this.author = hash.author 55 this.account = hash.account
56 this.createdAt = new Date(hash.createdAt.toString()) 56 this.createdAt = new Date(hash.createdAt.toString())
57 this.categoryLabel = hash.categoryLabel 57 this.categoryLabel = hash.categoryLabel
58 this.category = hash.category 58 this.category = hash.category
@@ -80,7 +80,7 @@ export class Video implements VideoServerModel {
80 this.dislikes = hash.dislikes 80 this.dislikes = hash.dislikes
81 this.nsfw = hash.nsfw 81 this.nsfw = hash.nsfw
82 82
83 this.by = Video.createByString(hash.author, hash.podHost) 83 this.by = Video.createByString(hash.account, hash.podHost)
84 } 84 }
85 85
86 isVideoNSFWForUser (user: User) { 86 isVideoNSFWForUser (user: User) {