Skip to content

Commit 6788026

Browse files
committed
Fix
1 parent 4514d1c commit 6788026

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/rest/forum/forum.controller.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
HttpException,
77
NotFoundException,
88
Param,
9+
ParseBoolPipe,
910
Patch,
1011
Post,
1112
Query,
@@ -203,14 +204,19 @@ export class ForumController {
203204
enum: ThreadType,
204205
enumName: "ThreadType",
205206
})
207+
@ApiQuery({
208+
name: "only_authored",
209+
required: true,
210+
type: Boolean,
211+
})
206212
@WithOptionalUser()
207213
@Get("threads")
208214
async threads(
209215
@Req() req: any,
210216
@Query("page", NullableIntPipe) page: number,
211217
@Query("per_page", NullableIntPipe) perPage: number = 25,
212218
@Query("threadType") threadType?: ThreadType,
213-
@Query("only_authored") onlyAuthored: boolean = false,
219+
@Query("only_authored", ParseBoolPipe) onlyAuthored: boolean = false,
214220
@CurrentUser() u?: CurrentUserDto,
215221
): Promise<ThreadPageDTO> {
216222
const threads = await this.api.forumControllerThreads(

0 commit comments

Comments
 (0)