diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:05:31 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 19:23:10 +0200 |
commit | 1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch) | |
tree | 27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/models/account/account.ts | |
parent | 0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff) | |
download | PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip |
Type toFormattedJSON
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r-- | server/models/account/account.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index 4cc731075..8369738b9 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -32,7 +32,7 @@ import { FindOptions, IncludeOptions, Op, Transaction, WhereOptions } from 'sequ | |||
32 | import { AccountBlocklistModel } from './account-blocklist' | 32 | import { AccountBlocklistModel } from './account-blocklist' |
33 | import { ServerBlocklistModel } from '../server/server-blocklist' | 33 | import { ServerBlocklistModel } from '../server/server-blocklist' |
34 | import { ActorFollowModel } from '../activitypub/actor-follow' | 34 | import { ActorFollowModel } from '../activitypub/actor-follow' |
35 | import { MAccountActor, MAccountDefault } from '../../typings/models' | 35 | import { MAccountActor, MAccountDefault, MAccountSummaryFormattable, MAccountFormattable } from '../../typings/models' |
36 | import * as Bluebird from 'bluebird' | 36 | import * as Bluebird from 'bluebird' |
37 | 37 | ||
38 | export enum ScopeNames { | 38 | export enum ScopeNames { |
@@ -353,7 +353,7 @@ export class AccountModel extends Model<AccountModel> { | |||
353 | .findAll(query) | 353 | .findAll(query) |
354 | } | 354 | } |
355 | 355 | ||
356 | toFormattedJSON (): Account { | 356 | toFormattedJSON (this: MAccountFormattable): Account { |
357 | const actor = this.Actor.toFormattedJSON() | 357 | const actor = this.Actor.toFormattedJSON() |
358 | const account = { | 358 | const account = { |
359 | id: this.id, | 359 | id: this.id, |
@@ -367,8 +367,8 @@ export class AccountModel extends Model<AccountModel> { | |||
367 | return Object.assign(actor, account) | 367 | return Object.assign(actor, account) |
368 | } | 368 | } |
369 | 369 | ||
370 | toFormattedSummaryJSON (): AccountSummary { | 370 | toFormattedSummaryJSON (this: MAccountSummaryFormattable): AccountSummary { |
371 | const actor = this.Actor.toFormattedJSON() | 371 | const actor = this.Actor.toFormattedSummaryJSON() |
372 | 372 | ||
373 | return { | 373 | return { |
374 | id: this.id, | 374 | id: this.id, |