89fd333702
Add client-logging SDK, expanded event taxonomy, API observability, admin domain events UI, and move SENTRY_DSN to HQ system settings with @sentry/node bootstrap after config preload. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { Controller, Get, Param, Query, UseGuards } from '@nestjs/common';
|
|
import type { EventType } from '@prisma/client';
|
|
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
|
import { AdminDomainEventsService } from './admin-domain-events.service';
|
|
|
|
@Controller('admin/logs/domain-events')
|
|
@UseGuards(HqAuthGuard)
|
|
export class AdminDomainEventsController {
|
|
constructor(private readonly service: AdminDomainEventsService) {}
|
|
|
|
@Get()
|
|
list(
|
|
@Query('page') page?: string,
|
|
@Query('pageSize') pageSize?: string,
|
|
@Query('eventType') eventType?: EventType,
|
|
@Query('refType') refType?: string,
|
|
@Query('refId') refId?: string,
|
|
@Query('from') from?: string,
|
|
@Query('to') to?: string,
|
|
) {
|
|
return this.service.list({
|
|
page: page ? Number(page) : undefined,
|
|
pageSize: pageSize ? Number(pageSize) : undefined,
|
|
eventType,
|
|
refType,
|
|
refId,
|
|
from,
|
|
to,
|
|
});
|
|
}
|
|
|
|
@Get(':id')
|
|
detail(@Param('id') id: string) {
|
|
return this.service.detail(BigInt(id));
|
|
}
|
|
}
|