v3数据表更改
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { Body, Controller, Get, Param, Post, Query, UseGuards } from '@nestjs/common';
|
||||
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
|
||||
import { EventService } from './event.service';
|
||||
import { EventListQueryDto, EventTimelineQueryDto } from './dto/common-query.dto';
|
||||
import { CreateEventDto } from './dto/common-mutate.dto';
|
||||
|
||||
@Controller('common/events')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class EventController {
|
||||
constructor(private readonly service: EventService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() dto: CreateEventDto) {
|
||||
return this.service.create(dto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
list(@Query() query: EventListQueryDto) {
|
||||
return this.service.list(query);
|
||||
}
|
||||
|
||||
@Get('timeline')
|
||||
timeline(@Query() query: EventTimelineQueryDto) {
|
||||
return this.service.timeline(query);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@Param('id') id: string) {
|
||||
return this.service.detail(BigInt(id));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user