feature(dashboard): add ability to filter out events by profile id and ip (#101)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-12-07 21:34:32 +01:00
committed by GitHub
parent 27ee623584
commit f4ad97d87d
39 changed files with 1148 additions and 542 deletions

View File

@@ -1,7 +1,6 @@
import crypto from 'node:crypto';
import { z } from 'zod';
import { stripTrailingSlash } from '@openpanel/common';
import type { Prisma } from '@openpanel/db';
import { db } from '@openpanel/db';
@@ -47,8 +46,6 @@ export const clientRouter = createTRPCRouter({
name: z.string(),
projectId: z.string(),
organizationId: z.string(),
cors: z.string().nullable(),
crossDomain: z.boolean().optional(),
type: z.enum(['read', 'write', 'root']).optional(),
}),
)
@@ -59,9 +56,7 @@ export const clientRouter = createTRPCRouter({
projectId: input.projectId,
name: input.name,
type: input.type ?? 'write',
cors: input.cors ? stripTrailingSlash(input.cors) : null,
secret: await hashPassword(secret),
crossDomain: input.crossDomain ?? false,
};
const client = await db.client.create({ data });