File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import {
14
14
ResponseStatusType ,
15
15
ResponseDto ,
16
16
WinningRequestDto ,
17
- SearchWinningResult ,
18
17
WinningCreateRequestDto ,
18
+ WinningDto ,
19
19
} from 'src/dto/adminWinning.dto' ;
20
20
21
21
import { AdminWinningService } from '../admin-winning/adminWinning.service' ;
@@ -78,18 +78,21 @@ export class WinningController {
78
78
@ApiResponse ( {
79
79
status : 200 ,
80
80
description : 'Search winnings successfully.' ,
81
- type : ResponseDto < SearchWinningResult > ,
81
+ type : ResponseDto < WinningDto [ ] > ,
82
82
} )
83
83
@HttpCode ( HttpStatus . OK )
84
84
async searchWinnings (
85
85
@Body ( ) body : WinningRequestDto ,
86
- ) : Promise < ResponseDto < SearchWinningResult > > {
86
+ ) : Promise < ResponseDto < WinningDto [ ] > > {
87
87
const result = await this . adminWinningService . searchWinnings ( body ) ;
88
88
89
89
result . status = result . error
90
90
? ResponseStatusType . ERROR
91
91
: ResponseStatusType . SUCCESS ;
92
92
93
- return result ;
93
+ return {
94
+ ...result ,
95
+ data : result . data . winnings ,
96
+ } ;
94
97
}
95
98
}
You can’t perform that action at this time.
0 commit comments