From 79066fdf33f79d2d41394f10881e2c226ca26b49 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Dec 2016 11:45:00 +0100 Subject: Server: add updatedAt attribute to videos --- server/models/video.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/models') 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 // --------------------------------------------------------------------------- module.exports = function (sequelize, DataTypes) { - // TODO: add indexes on searchable columns const Video = sequelize.define('Video', { id: { @@ -329,7 +328,8 @@ function toFormatedJSON () { duration: this.duration, tags: map(this.Tags, 'name'), thumbnailPath: constants.STATIC_PATHS.THUMBNAILS + '/' + this.getThumbnailName(), - createdAt: this.createdAt + createdAt: this.createdAt, + updatedAt: this.updatedAt } return json @@ -356,6 +356,7 @@ function toAddRemoteJSON (callback) { thumbnailData: thumbnailData.toString('binary'), tags: map(self.Tags, 'name'), createdAt: self.createdAt, + updatedAt: self.updatedAt, extname: self.extname } @@ -373,6 +374,7 @@ function toUpdateRemoteJSON (callback) { duration: this.duration, tags: map(this.Tags, 'name'), createdAt: this.createdAt, + updatedAt: this.updatedAt, extname: this.extname } -- cgit v1.2.3