feat: add editing support to InternalPoster

This commit is contained in:
Dragory 2021-11-02 23:10:37 +02:00
parent ecd9a5863c
commit 31f18ba27f
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
6 changed files with 113 additions and 39 deletions

View file

@ -16,6 +16,16 @@ export class Webhooks extends BaseRepository {
return entity;
}
async find(id: string): Promise<Webhook | null> {
const result = await this.repository.findOne({
where: {
id,
},
});
return result ? this._processEntityFromDB(result) : null;
}
async findByChannelId(channelId: string): Promise<Webhook | null> {
const result = await this.repository.findOne({
where: {