@@ -11,4 +11,13 @@ export class InstallationRepository extends Repository<Installation> {
return this.findOne(id);
}
+ async findByTeamIdOrEnterpriseId(installation:Partial<Installation>): Promise<Installation|undefined> {
+ return this.findOne({
+ where: [
+ { teamId: installation.teamId },
+ { enterpriseId: installation.enterpriseId },
+ ],
+ });
+ }
+