fix: update return type of findOneByForeignId to include null

This commit is contained in:
Aditya 2025-01-24 20:06:50 +05:30
parent ae4bfcfe89
commit 4bc783ccbe

View File

@ -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;
}
/**