MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / deleteProjects

Function deleteProjects

packages/db/src/services/delete.service.ts:15–37  ·  view source on GitHub ↗
(projectIds: string[])

Source from the content-addressed store, hash-verified

13}
14
15export async function deleteProjects(projectIds: string[]) {
16 const projects = await db.project.findMany({
17 where: {
18 id: {
19 in: projectIds,
20 },
21 },
22 });
23
24 if (projects.length === 0) {
25 return;
26 }
27
28 for (const project of projects) {
29 await db.project.delete({
30 where: {
31 id: project.id,
32 },
33 });
34 }
35
36 return projects;
37}
38
39export async function deleteFromClickhouse(projectIds: string[]) {
40 const where = `project_id IN (${projectIds.map((projectId) => sqlstring.escape(projectId)).join(',')})`;

Callers 1

jobDeleteFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected