aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 19:05:31 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 19:23:10 +0200
commit1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch)
tree27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/models/account/account.ts
parent0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff)
downloadPeerTube-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.ts8
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
32import { AccountBlocklistModel } from './account-blocklist' 32import { AccountBlocklistModel } from './account-blocklist'
33import { ServerBlocklistModel } from '../server/server-blocklist' 33import { ServerBlocklistModel } from '../server/server-blocklist'
34import { ActorFollowModel } from '../activitypub/actor-follow' 34import { ActorFollowModel } from '../activitypub/actor-follow'
35import { MAccountActor, MAccountDefault } from '../../typings/models' 35import { MAccountActor, MAccountDefault, MAccountSummaryFormattable, MAccountFormattable } from '../../typings/models'
36import * as Bluebird from 'bluebird' 36import * as Bluebird from 'bluebird'
37 37
38export enum ScopeNames { 38export 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,