feat: 添加项目置顶功能
在仪表盘中添加置顶项目功能,包括: - 新增置顶项目展示区域 - 为AI推荐项目添加置顶/取消置顶操作 - 后端接口支持置顶状态管理
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { Controller, Get, Query, Patch, Param, Body } from '@nestjs/common';
|
||||
import { BidsService } from '../services/bid.service';
|
||||
|
||||
@Controller('api/bids')
|
||||
@@ -15,6 +15,11 @@ export class BidsController {
|
||||
return this.bidsService.getRecentBids();
|
||||
}
|
||||
|
||||
@Get('pinned')
|
||||
getPinned() {
|
||||
return this.bidsService.getPinnedBids();
|
||||
}
|
||||
|
||||
@Get('sources')
|
||||
getSources() {
|
||||
return this.bidsService.getSources();
|
||||
@@ -30,4 +35,9 @@ export class BidsController {
|
||||
getCrawlInfoStats() {
|
||||
return this.bidsService.getCrawlInfoAddStats();
|
||||
}
|
||||
|
||||
@Patch(':title/pin')
|
||||
updatePin(@Param('title') title: string, @Body() body: { pin: boolean }) {
|
||||
return this.bidsService.updatePin(title, body.pin);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user