mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 12:59:14 +00:00
fix: update return type of findOneByForeignId to include null
This commit is contained in:
parent
ae4bfcfe89
commit
4bc783ccbe
@ -125,10 +125,10 @@ export class SubscriberRepository extends BaseRepository<
|
||||
*
|
||||
* @returns The found subscriber entity.
|
||||
*/
|
||||
async findOneByForeignId(id: string): Promise<Subscriber> {
|
||||
async findOneByForeignId(id: string): Promise<Subscriber | null> {
|
||||
const query = this.findByForeignIdQuery(id);
|
||||
const [result] = await this.execute(query, Subscriber);
|
||||
return result;
|
||||
return result || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user