diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:10:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:10:40 +0100 |
commit | 01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea (patch) | |
tree | 9e01809f09adbcd512a8dedf73093a123f88e02c /server/models/activitypub | |
parent | 47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (diff) | |
download | PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.gz PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.zst PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.zip |
Add avatar max size limit
Diffstat (limited to 'server/models/activitypub')
-rw-r--r-- | server/models/activitypub/actor.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index a12f3ec9e..ff5ab2e32 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -87,17 +87,17 @@ export class ActorModel extends Model<ActorModel> { | |||
87 | 87 | ||
88 | @AllowNull(false) | 88 | @AllowNull(false) |
89 | @Is('ActorUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'url')) | 89 | @Is('ActorUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'url')) |
90 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 90 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
91 | url: string | 91 | url: string |
92 | 92 | ||
93 | @AllowNull(true) | 93 | @AllowNull(true) |
94 | @Is('ActorPublicKey', value => throwIfNotValid(value, isActorPublicKeyValid, 'public key')) | 94 | @Is('ActorPublicKey', value => throwIfNotValid(value, isActorPublicKeyValid, 'public key')) |
95 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.PUBLIC_KEY.max)) | 95 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.PUBLIC_KEY.max)) |
96 | publicKey: string | 96 | publicKey: string |
97 | 97 | ||
98 | @AllowNull(true) | 98 | @AllowNull(true) |
99 | @Is('ActorPublicKey', value => throwIfNotValid(value, isActorPrivateKeyValid, 'private key')) | 99 | @Is('ActorPublicKey', value => throwIfNotValid(value, isActorPrivateKeyValid, 'private key')) |
100 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.PRIVATE_KEY.max)) | 100 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.PRIVATE_KEY.max)) |
101 | privateKey: string | 101 | privateKey: string |
102 | 102 | ||
103 | @AllowNull(false) | 103 | @AllowNull(false) |
@@ -112,27 +112,27 @@ export class ActorModel extends Model<ActorModel> { | |||
112 | 112 | ||
113 | @AllowNull(false) | 113 | @AllowNull(false) |
114 | @Is('ActorInboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'inbox url')) | 114 | @Is('ActorInboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'inbox url')) |
115 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 115 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
116 | inboxUrl: string | 116 | inboxUrl: string |
117 | 117 | ||
118 | @AllowNull(false) | 118 | @AllowNull(false) |
119 | @Is('ActorOutboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'outbox url')) | 119 | @Is('ActorOutboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'outbox url')) |
120 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 120 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
121 | outboxUrl: string | 121 | outboxUrl: string |
122 | 122 | ||
123 | @AllowNull(false) | 123 | @AllowNull(false) |
124 | @Is('ActorSharedInboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'shared inbox url')) | 124 | @Is('ActorSharedInboxUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'shared inbox url')) |
125 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 125 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
126 | sharedInboxUrl: string | 126 | sharedInboxUrl: string |
127 | 127 | ||
128 | @AllowNull(false) | 128 | @AllowNull(false) |
129 | @Is('ActorFollowersUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'followers url')) | 129 | @Is('ActorFollowersUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'followers url')) |
130 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 130 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
131 | followersUrl: string | 131 | followersUrl: string |
132 | 132 | ||
133 | @AllowNull(false) | 133 | @AllowNull(false) |
134 | @Is('ActorFollowingUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'following url')) | 134 | @Is('ActorFollowingUrl', value => throwIfNotValid(value, isActivityPubUrlValid, 'following url')) |
135 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTOR.URL.max)) | 135 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.ACTORS.URL.max)) |
136 | followingUrl: string | 136 | followingUrl: string |
137 | 137 | ||
138 | @CreatedAt | 138 | @CreatedAt |