feat: 技术支持工单/企微权限/开发版本管理/消息推送等迭代
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { Body, Controller, Headers, Post, UseGuards } from '@nestjs/common';
|
||||
import { OptionalJwtAuthGuard } from '../../common/guards/optional-jwt-auth.guard';
|
||||
import { CurrentUser } from '../../common/decorators/current-user.decorator';
|
||||
import type { AuthUser } from '../../common/guards/jwt-auth.guard';
|
||||
import { ClientErrorService } from './client-error.service';
|
||||
import { ReportClientErrorDto } from './dto/client-error.dto';
|
||||
|
||||
@Controller('common')
|
||||
export class ClientErrorController {
|
||||
constructor(private readonly clientErrors: ClientErrorService) {}
|
||||
|
||||
/**
|
||||
* 客户端报错上报(可匿名)。
|
||||
* fatal/error → Nest 日志 + 落库 + 企微;warn → 仅日志/落库。
|
||||
*/
|
||||
@Post('client-errors')
|
||||
@UseGuards(OptionalJwtAuthGuard)
|
||||
report(
|
||||
@Body() dto: ReportClientErrorDto,
|
||||
@CurrentUser() user: AuthUser | undefined,
|
||||
@Headers('x-client-app') clientApp?: string,
|
||||
) {
|
||||
return this.clientErrors.report(dto, user, clientApp);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user