File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 6
6
HttpException ,
7
7
NotFoundException ,
8
8
Param ,
9
+ ParseBoolPipe ,
9
10
Patch ,
10
11
Post ,
11
12
Query ,
@@ -203,14 +204,19 @@ export class ForumController {
203
204
enum : ThreadType ,
204
205
enumName : "ThreadType" ,
205
206
} )
207
+ @ApiQuery ( {
208
+ name : "only_authored" ,
209
+ required : true ,
210
+ type : Boolean ,
211
+ } )
206
212
@WithOptionalUser ( )
207
213
@Get ( "threads" )
208
214
async threads (
209
215
@Req ( ) req : any ,
210
216
@Query ( "page" , NullableIntPipe ) page : number ,
211
217
@Query ( "per_page" , NullableIntPipe ) perPage : number = 25 ,
212
218
@Query ( "threadType" ) threadType ?: ThreadType ,
213
- @Query ( "only_authored" ) onlyAuthored : boolean = false ,
219
+ @Query ( "only_authored" , ParseBoolPipe ) onlyAuthored : boolean = false ,
214
220
@CurrentUser ( ) u ?: CurrentUserDto ,
215
221
) : Promise < ThreadPageDTO > {
216
222
const threads = await this . api . forumControllerThreads (
You can’t perform that action at this time.
0 commit comments