aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-12 11:56:02 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-12 11:56:02 +0200
commitf981dae8617271a2dc713bb683951730b306e0c5 (patch)
treeecee631766bc1b98c20a7836479fed40850c5a56 /server/models
parent075f16caac5236cb04c98ae7b3a989766d764bb3 (diff)
downloadPeerTube-f981dae8617271a2dc713bb683951730b306e0c5.tar.gz
PeerTube-f981dae8617271a2dc713bb683951730b306e0c5.tar.zst
PeerTube-f981dae8617271a2dc713bb683951730b306e0c5.zip
Add previews cache system between pods
Diffstat (limited to 'server/models')
-rw-r--r--server/models/oauth/oauth-token-interface.ts2
-rw-r--r--server/models/oauth/oauth-token.ts4
-rw-r--r--server/models/video/video.ts1
3 files changed, 5 insertions, 2 deletions
diff --git a/server/models/oauth/oauth-token-interface.ts b/server/models/oauth/oauth-token-interface.ts
index f2ddafa54..97af3c815 100644
--- a/server/models/oauth/oauth-token-interface.ts
+++ b/server/models/oauth/oauth-token-interface.ts
@@ -35,6 +35,8 @@ export interface OAuthTokenAttributes {
35 refreshToken: string 35 refreshToken: string
36 refreshTokenExpiresAt: Date 36 refreshTokenExpiresAt: Date
37 37
38 userId?: number
39 oAuthClientId?: number
38 User?: UserModel 40 User?: UserModel
39} 41}
40 42
diff --git a/server/models/oauth/oauth-token.ts b/server/models/oauth/oauth-token.ts
index 5c3781394..e3de9468e 100644
--- a/server/models/oauth/oauth-token.ts
+++ b/server/models/oauth/oauth-token.ts
@@ -106,10 +106,10 @@ getByRefreshTokenAndPopulateClient = function (refreshToken: string) {
106 refreshToken: token.refreshToken, 106 refreshToken: token.refreshToken,
107 refreshTokenExpiresAt: token.refreshTokenExpiresAt, 107 refreshTokenExpiresAt: token.refreshTokenExpiresAt,
108 client: { 108 client: {
109 id: token['client'].id 109 id: token.oAuthClientId
110 }, 110 },
111 user: { 111 user: {
112 id: token['user'] 112 id: token.userId
113 } 113 }
114 } 114 }
115 115
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 650025205..b7eb24c4a 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -451,6 +451,7 @@ toFormatedJSON = function (this: VideoInstance) {
451 dislikes: this.dislikes, 451 dislikes: this.dislikes,
452 tags: map<TagInstance, string>(this.Tags, 'name'), 452 tags: map<TagInstance, string>(this.Tags, 'name'),
453 thumbnailPath: join(STATIC_PATHS.THUMBNAILS, this.getThumbnailName()), 453 thumbnailPath: join(STATIC_PATHS.THUMBNAILS, this.getThumbnailName()),
454 previewPath: join(STATIC_PATHS.PREVIEWS, this.getPreviewName()),
454 createdAt: this.createdAt, 455 createdAt: this.createdAt,
455 updatedAt: this.updatedAt 456 updatedAt: this.updatedAt
456 } 457 }