mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
Don't include banners in account API
This commit is contained in:
parent
605f5328c1
commit
b65d639695
@ -408,7 +408,7 @@ export class AccountModel extends SequelizeModel<AccountModel> {
|
|||||||
|
|
||||||
toFormattedJSON (this: MAccountFormattable): Account {
|
toFormattedJSON (this: MAccountFormattable): Account {
|
||||||
return {
|
return {
|
||||||
...this.Actor.toFormattedJSON(),
|
...this.Actor.toFormattedJSON(false),
|
||||||
|
|
||||||
id: this.id,
|
id: this.id,
|
||||||
displayName: this.getDisplayName(),
|
displayName: this.getDisplayName(),
|
||||||
|
@ -542,7 +542,7 @@ export class ActorModel extends SequelizeModel<ActorModel> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toFormattedJSON (this: MActorFormattable) {
|
toFormattedJSON (this: MActorFormattable, includeBanner = true) {
|
||||||
return {
|
return {
|
||||||
...this.toFormattedSummaryJSON(),
|
...this.toFormattedSummaryJSON(),
|
||||||
|
|
||||||
@ -552,7 +552,9 @@ export class ActorModel extends SequelizeModel<ActorModel> {
|
|||||||
followersCount: this.followersCount,
|
followersCount: this.followersCount,
|
||||||
createdAt: this.getCreatedAt(),
|
createdAt: this.getCreatedAt(),
|
||||||
|
|
||||||
banners: (this.Banners || []).map(b => b.toFormattedJSON())
|
banners: includeBanner
|
||||||
|
? (this.Banners || []).map(b => b.toFormattedJSON())
|
||||||
|
: undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user