Add setWebhook resolver

This commit is contained in:
Hongbo Wu
2022-05-25 22:20:13 +08:00
parent 5528d1d349
commit 6d0ce30a44
6 changed files with 95 additions and 6 deletions

View File

@ -21,21 +21,21 @@ export class Webhook {
@Column('text')
url!: string
@Column('text[]')
@Column('text', { array: true })
eventTypes!: string[]
@Column('text', { default: 'POST' })
method?: string
method!: string
@Column('text', { default: 'application/json' })
contentType?: string
contentType!: string
@Column('boolean', { default: true })
enabled?: boolean
enabled!: boolean
@CreateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
createdAt?: Date
createdAt!: Date
@UpdateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
updatedAt?: Date
updatedAt!: Date
}