init
This commit is contained in:
22
server/src/modules/tools/tools.controller.ts
Normal file
22
server/src/modules/tools/tools.controller.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Controller, Get, Param, Query } from '@nestjs/common';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { GetToolsQueryDto } from './dto/get-tools-query.dto';
|
||||
import { ToolsService } from './tools.service';
|
||||
|
||||
@ApiTags('public-tools')
|
||||
@Controller('tools')
|
||||
export class ToolsController {
|
||||
constructor(private readonly toolsService: ToolsService) {}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'Query tools' })
|
||||
getTools(@Query() query: GetToolsQueryDto) {
|
||||
return this.toolsService.getTools(query);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@ApiOperation({ summary: 'Get tool detail' })
|
||||
getToolDetail(@Param('id') id: string) {
|
||||
return this.toolsService.getToolDetail(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user