Files
bidding_watcher/src/keywords/keywords.controller.ts

23 lines
577 B
TypeScript
Raw Normal View History

2026-01-09 23:18:52 +08:00
import { Controller, Get, Post, Body, Delete, Param } from '@nestjs/common';
import { KeywordsService } from './keywords.service';
@Controller('api/keywords')
export class KeywordsController {
constructor(private readonly keywordsService: KeywordsService) {}
@Get()
findAll() {
return this.keywordsService.findAll();
}
@Post()
create(@Body('word') word: string, @Body('weight') weight: number) {
return this.keywordsService.create(word, weight);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.keywordsService.remove(id);
}
}