From 38fa2065831b5f55be0d7f30f19a62c967397208 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Nov 2017 14:48:08 +0100 Subject: Remove references to author --- server/models/account/user.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/account') diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 1401762c5..7390baf91 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts @@ -164,7 +164,7 @@ toFormattedJSON = function (this: UserInstance) { roleLabel: USER_ROLE_LABELS[this.role], videoQuota: this.videoQuota, createdAt: this.createdAt, - author: { + account: { id: this.Account.id, uuid: this.Account.uuid } @@ -295,7 +295,7 @@ function getOriginalVideoFileTotalFromUser (user: UserInstance) { '(SELECT MAX("VideoFiles"."size") AS "size" FROM "VideoFiles" ' + 'INNER JOIN "Videos" ON "VideoFiles"."videoId" = "Videos"."id" ' + 'INNER JOIN "VideoChannels" ON "VideoChannels"."id" = "Videos"."channelId" ' + - 'INNER JOIN "Accounts" ON "VideoChannels"."authorId" = "Accounts"."id" ' + + 'INNER JOIN "Accounts" ON "VideoChannels"."accountId" = "Accounts"."id" ' + 'INNER JOIN "Users" ON "Accounts"."userId" = "Users"."id" ' + 'WHERE "Users"."id" = $userId GROUP BY "Videos"."id") t' -- cgit v1.2.3