aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/user.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account/user.ts')
-rw-r--r--server/models/account/user.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index cb54d79af..616dd603c 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -55,7 +55,13 @@ import { UserAdminFlag } from '../../../shared/models/users/user-flag.model'
55import { isThemeNameValid } from '../../helpers/custom-validators/plugins' 55import { isThemeNameValid } from '../../helpers/custom-validators/plugins'
56import { getThemeOrDefault } from '../../lib/plugins/theme-utils' 56import { getThemeOrDefault } from '../../lib/plugins/theme-utils'
57import * as Bluebird from 'bluebird' 57import * as Bluebird from 'bluebird'
58import { MUserNotifSettingChannelDefault, MUserDefault, MUserId, MUserWithNotificationSetting } from '@server/typings/models' 58import {
59 MUserDefault,
60 MUserFormattable,
61 MUserId,
62 MUserNotifSettingChannelDefault,
63 MUserWithNotificationSetting
64} from '@server/typings/models'
59 65
60enum ScopeNames { 66enum ScopeNames {
61 WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL' 67 WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL'
@@ -554,7 +560,9 @@ export class UserModel extends Model<UserModel> {
554 return comparePassword(password, this.password) 560 return comparePassword(password, this.password)
555 } 561 }
556 562
557 toFormattedJSON (parameters: { withAdminFlags?: boolean } = {}): User { 563 toSummaryJSON
564
565 toFormattedJSON (this: MUserFormattable, parameters: { withAdminFlags?: boolean } = {}): User {
558 const videoQuotaUsed = this.get('videoQuotaUsed') 566 const videoQuotaUsed = this.get('videoQuotaUsed')
559 const videoQuotaUsedDaily = this.get('videoQuotaUsedDaily') 567 const videoQuotaUsedDaily = this.get('videoQuotaUsedDaily')
560 568