fix: Add support for STATIC segment type in CampaignService

This commit is contained in:
Dries Augustyns
2026-02-23 21:45:17 +01:00
parent e8a247fe12
commit 7bd098bdd0
+12
View File
@@ -760,6 +760,18 @@ export class CampaignService {
throw new HttpException(404, 'Segment not found');
}
if (segment.type === 'STATIC') {
return {
...baseWhere,
segmentMemberships: {
some: {
segmentId,
exitedAt: null,
},
},
};
}
const condition = fromPrismaJson<FilterCondition>(segment.condition);
const segmentWhere = SegmentService.buildConditionClause(condition);