fix(api): filter events by profileId for export route
This commit is contained in:
@@ -65,6 +65,7 @@ async function getProjectId(
|
||||
const eventsScheme = z.object({
|
||||
project_id: z.string().optional(),
|
||||
projectId: z.string().optional(),
|
||||
profileId: z.string().optional(),
|
||||
event: z.union([z.string(), z.array(z.string())]).optional(),
|
||||
start: z.coerce.string().optional(),
|
||||
end: z.coerce.string().optional(),
|
||||
@@ -109,6 +110,7 @@ export async function events(
|
||||
endDate: query.data.end ? new Date(query.data.end) : undefined,
|
||||
cursor,
|
||||
take,
|
||||
profileId: query.data.profileId,
|
||||
select: {
|
||||
profile: false,
|
||||
meta: false,
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { FastifyPluginCallback, FastifyRequest } from 'fastify';
|
||||
const exportRouter: FastifyPluginCallback = async (fastify) => {
|
||||
await activateRateLimiter({
|
||||
fastify,
|
||||
max: 10,
|
||||
max: 100,
|
||||
timeWindow: '10 seconds',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user