Browse Source

feat(ads): update listAdsByType method to return any type instead of AllAdsResponseDto

Dave 2 tháng trước cách đây
mục cha
commit
37eea85c08

+ 1 - 3
apps/box-app-api/src/feature/ads/ad.controller.ts

@@ -68,9 +68,7 @@ export class AdController {
     description: '成功返回所有广告类型和分组广告列表',
     type: AllAdsResponseDto,
   })
-  async listAdsByType(
-    @Body() req: AdListRequestDto,
-  ): Promise<AllAdsResponseDto> {
+  async listAdsByType(@Body() req: AdListRequestDto): Promise<any> {
     const { page, size } = req;
 
     this.logger.debug(`listAdsByType: page=${page}, size=${size}`);

+ 1 - 2
apps/box-app-api/src/feature/ads/ad.service.ts

@@ -225,7 +225,7 @@ export class AdService {
    * 2. For each ad type, fetch ads from Redis pool with pagination
    * 3. Return adTypes list and adsList grouped by type
    */
-  async listAdsByType(page: number, size: number): Promise<AllAdsResponseDto> {
+  async listAdsByType(page: number, size: number): Promise<any> {
     // Step 1: Get all ad types
     const adTypes = await this.sysParamsService.getAdTypes();
 
@@ -346,7 +346,6 @@ export class AdService {
     }
 
     return {
-      adTypes,
       adsList,
       page,
       size,