diff options
Diffstat (limited to 'server/models/account/user.ts')
-rw-r--r-- | server/models/account/user.ts | 12 |
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' | |||
55 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | 55 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' |
56 | import { getThemeOrDefault } from '../../lib/plugins/theme-utils' | 56 | import { getThemeOrDefault } from '../../lib/plugins/theme-utils' |
57 | import * as Bluebird from 'bluebird' | 57 | import * as Bluebird from 'bluebird' |
58 | import { MUserNotifSettingChannelDefault, MUserDefault, MUserId, MUserWithNotificationSetting } from '@server/typings/models' | 58 | import { |
59 | MUserDefault, | ||
60 | MUserFormattable, | ||
61 | MUserId, | ||
62 | MUserNotifSettingChannelDefault, | ||
63 | MUserWithNotificationSetting | ||
64 | } from '@server/typings/models' | ||
59 | 65 | ||
60 | enum ScopeNames { | 66 | enum 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 | ||