mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
Updated segment handling.
This commit is contained in:
parent
554c627a58
commit
fba7e12c36
13 changed files with 59 additions and 90 deletions
|
|
@ -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 },
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue