aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video.js')
-rw-r--r--server/models/video.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/video.js b/server/models/video.js
index f51d08f06..3fe8368c7 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -20,7 +20,6 @@ const customVideosValidators = require('../helpers/custom-validators').videos
20// --------------------------------------------------------------------------- 20// ---------------------------------------------------------------------------
21 21
22module.exports = function (sequelize, DataTypes) { 22module.exports = function (sequelize, DataTypes) {
23 // TODO: add indexes on searchable columns
24 const Video = sequelize.define('Video', 23 const Video = sequelize.define('Video',
25 { 24 {
26 id: { 25 id: {
@@ -329,7 +328,8 @@ function toFormatedJSON () {
329 duration: this.duration, 328 duration: this.duration,
330 tags: map(this.Tags, 'name'), 329 tags: map(this.Tags, 'name'),
331 thumbnailPath: constants.STATIC_PATHS.THUMBNAILS + '/' + this.getThumbnailName(), 330 thumbnailPath: constants.STATIC_PATHS.THUMBNAILS + '/' + this.getThumbnailName(),
332 createdAt: this.createdAt 331 createdAt: this.createdAt,
332 updatedAt: this.updatedAt
333 } 333 }
334 334
335 return json 335 return json
@@ -356,6 +356,7 @@ function toAddRemoteJSON (callback) {
356 thumbnailData: thumbnailData.toString('binary'), 356 thumbnailData: thumbnailData.toString('binary'),
357 tags: map(self.Tags, 'name'), 357 tags: map(self.Tags, 'name'),
358 createdAt: self.createdAt, 358 createdAt: self.createdAt,
359 updatedAt: self.updatedAt,
359 extname: self.extname 360 extname: self.extname
360 } 361 }
361 362
@@ -373,6 +374,7 @@ function toUpdateRemoteJSON (callback) {
373 duration: this.duration, 374 duration: this.duration,
374 tags: map(this.Tags, 'name'), 375 tags: map(this.Tags, 'name'),
375 createdAt: this.createdAt, 376 createdAt: this.createdAt,
377 updatedAt: this.updatedAt,
376 extname: this.extname 378 extname: this.extname
377 } 379 }
378 380