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:
parent
29a88c0dde
commit
13bceb5f40
77 changed files with 919 additions and 912 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue