Updated segment handling.
This commit is contained in:
1 parent
554c627a58
commit
fba7e12c36
13 files changed
+59
-90
No files matched your search
@@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user