From 69f616ab3aeefd6ce330600604df90f2f48bfe3b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 11 Jun 2017 11:02:35 +0200 Subject: Use shared models --- server/models/user.ts | 2 +- server/models/video.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models') diff --git a/server/models/user.ts b/server/models/user.ts index 0fbfdda50..cd383a16a 100644 --- a/server/models/user.ts +++ b/server/models/user.ts @@ -135,7 +135,7 @@ isPasswordMatch = function (password: string, callback: UserMethods.IsPasswordMa return comparePassword(password, this.password, callback) } -toFormatedJSON = function () { +toFormatedJSON = function (this: UserInstance) { return { id: this.id, username: this.username, diff --git a/server/models/video.ts b/server/models/video.ts index 3f808b811..2234664f4 100644 --- a/server/models/video.ts +++ b/server/models/video.ts @@ -447,7 +447,7 @@ isOwned = function () { return this.remoteId === null } -toFormatedJSON = function () { +toFormatedJSON = function (this: VideoInstance) { let podHost if (this.Author.Pod) { @@ -488,7 +488,7 @@ toFormatedJSON = function () { views: this.views, likes: this.likes, dislikes: this.dislikes, - tags: map(this.Tags, 'name'), + tags: map(this.Tags, 'name'), thumbnailPath: join(STATIC_PATHS.THUMBNAILS, this.getThumbnailName()), createdAt: this.createdAt, updatedAt: this.updatedAt -- cgit v1.2.3