1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Better thumbnail error handling

* Had to upgrade to es2022 to use `cause` error
 * Had to declare class attributes with declare for sequelize models, so
   it still works as before
This commit is contained in:
Chocobozzz 2025-07-25 17:01:36 +02:00
parent 29a88c0dde
commit 13bceb5f40
No known key found for this signature in database
GPG key ID: 583A612D890159BE
77 changed files with 919 additions and 912 deletions

View file

@ -16,31 +16,30 @@ import { SequelizeModel } from '../shared/index.js'
]
})
export class OAuthClientModel extends SequelizeModel<OAuthClientModel> {
@AllowNull(false)
@Column
declare clientId: string
@AllowNull(false)
@Column
clientId: string
@AllowNull(false)
@Column
clientSecret: string
declare clientSecret: string
@Column(DataType.ARRAY(DataType.STRING))
grants: string[]
declare grants: string[]
@Column(DataType.ARRAY(DataType.STRING))
redirectUris: string[]
declare redirectUris: string[]
@CreatedAt
createdAt: Date
declare createdAt: Date
@UpdatedAt
updatedAt: Date
declare updatedAt: Date
@HasMany(() => OAuthTokenModel, {
onDelete: 'cascade'
})
OAuthTokens: Awaited<OAuthTokenModel>[]
declare OAuthTokens: Awaited<OAuthTokenModel>[]
static countTotal () {
return OAuthClientModel.count()