Updated segment handling.

This commit is contained in:
Mike Cao committed 2025-07-31 02:33:35 -07:00
1 parent 554c627a58
commit fba7e12c36
13 files changed
+59 -90

No files matched your search

+3 -7
View File
@@ -13,13 +13,9 @@ export async function getSegment(segmentId: string): Promise<Segment> {
});
}
export async function getWebsiteSegment(
websiteId: string,
type: string,
name: string,
): Promise<Segment> {
return prisma.client.segment.findFirst({
where: { websiteId, type, name },
export async function getWebsiteSegment(websiteId: string, segmentId: string): Promise<Segment> {
return prisma.client.Segment.findFirst({
where: { id: segmentId, websiteId },
});
}