aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/avatar/avatar.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/avatar/avatar.ts
parent0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff)
downloadPeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip
Type toFormattedJSON
Diffstat (limited to 'server/models/avatar/avatar.ts')
-rw-r--r--server/models/avatar/avatar.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.ts
index b40144592..950e4b181 100644
--- a/server/models/avatar/avatar.ts
+++ b/server/models/avatar/avatar.ts
@@ -7,6 +7,7 @@ import { remove } from 'fs-extra'
7import { CONFIG } from '../../initializers/config' 7import { CONFIG } from '../../initializers/config'
8import { throwIfNotValid } from '../utils' 8import { throwIfNotValid } from '../utils'
9import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 9import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
10import { MAvatarFormattable } from '@server/typings/models'
10 11
11@Table({ 12@Table({
12 tableName: 'avatar', 13 tableName: 'avatar',
@@ -57,7 +58,7 @@ export class AvatarModel extends Model<AvatarModel> {
57 return AvatarModel.findOne(query) 58 return AvatarModel.findOne(query)
58 } 59 }
59 60
60 toFormattedJSON (): Avatar { 61 toFormattedJSON (this: MAvatarFormattable): Avatar {
61 return { 62 return {
62 path: this.getStaticPath(), 63 path: this.getStaticPath(),
63 createdAt: this.createdAt, 64 createdAt: this.createdAt,