aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-04 10:34:40 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-04 10:34:40 +0100
commit2295ce6c4e7ba805cc100ff961527bebc2cd89e5 (patch)
treefce0a24074ac119aad730ef5c73c680500ff9578 /shared
parent202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (diff)
downloadPeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.gz
PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.zst
PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.zip
Add account avatar
Diffstat (limited to 'shared')
-rw-r--r--shared/models/accounts/account.model.ts8
-rw-r--r--shared/models/avatars/avatar.model.ts5
-rw-r--r--shared/models/users/user.model.ts8
3 files changed, 16 insertions, 5 deletions
diff --git a/shared/models/accounts/account.model.ts b/shared/models/accounts/account.model.ts
index 338426dc7..d14701317 100644
--- a/shared/models/accounts/account.model.ts
+++ b/shared/models/accounts/account.model.ts
@@ -1,5 +1,13 @@
1import { Avatar } from '../avatars/avatar.model'
2
1export interface Account { 3export interface Account {
2 id: number 4 id: number
5 uuid: string
3 name: string 6 name: string
4 host: string 7 host: string
8 followingCount: number
9 followersCount: number
10 createdAt: Date
11 updatedAt: Date
12 avatar: Avatar
5} 13}
diff --git a/shared/models/avatars/avatar.model.ts b/shared/models/avatars/avatar.model.ts
new file mode 100644
index 000000000..301d00929
--- /dev/null
+++ b/shared/models/avatars/avatar.model.ts
@@ -0,0 +1,5 @@
1export interface Avatar {
2 path: string
3 createdAt: Date | string
4 updatedAt: Date | string
5}
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index a8012734c..4b17881e5 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -1,3 +1,4 @@
1import { Account } from '../accounts'
1import { VideoChannel } from '../videos/video-channel.model' 2import { VideoChannel } from '../videos/video-channel.model'
2import { UserRole } from './user-role' 3import { UserRole } from './user-role'
3 4
@@ -8,10 +9,7 @@ export interface User {
8 displayNSFW: boolean 9 displayNSFW: boolean
9 role: UserRole 10 role: UserRole
10 videoQuota: number 11 videoQuota: number
11 createdAt: Date, 12 createdAt: Date
12 account: { 13 account: Account
13 id: number
14 uuid: string
15 }
16 videoChannels?: VideoChannel[] 14 videoChannels?: VideoChannel[]
17} 15}