diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-12-04 10:34:40 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-12-04 10:34:40 +0100 |
commit | 2295ce6c4e7ba805cc100ff961527bebc2cd89e5 (patch) | |
tree | fce0a24074ac119aad730ef5c73c680500ff9578 /shared | |
parent | 202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (diff) | |
download | PeerTube-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.ts | 8 | ||||
-rw-r--r-- | shared/models/avatars/avatar.model.ts | 5 | ||||
-rw-r--r-- | shared/models/users/user.model.ts | 8 |
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 @@ | |||
1 | import { Avatar } from '../avatars/avatar.model' | ||
2 | |||
1 | export interface Account { | 3 | export 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 @@ | |||
1 | export 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 @@ | |||
1 | import { Account } from '../accounts' | ||
1 | import { VideoChannel } from '../videos/video-channel.model' | 2 | import { VideoChannel } from '../videos/video-channel.model' |
2 | import { UserRole } from './user-role' | 3 | import { 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 | } |