MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / sendToOwner

Function sendToOwner

app/src/server/emails/sendToOwner.ts:3–21  ·  view source on GitHub ↗
(projectId: string, callback: (...args: any[]) => Promise<void>)

Source from the content-addressed store, hash-verified

1import { prisma } from "../db";
2
3export async function sendToOwner(projectId: string, callback: (...args: any[]) => Promise<void>) {
4 const owner = await prisma.projectUser.findFirst({
5 where: {
6 projectId: projectId,
7 role: "OWNER",
8 },
9 select: {
10 user: {
11 select: {
12 email: true,
13 },
14 },
15 },
16 });
17
18 if (owner?.user.email) {
19 await callback(owner.user.email);
20 }
21}

Callers 4

sendPaymentNotificationFunction · 0.90
chargeInvoiceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected