@@ -53,6 +53,23 @@ export class ClubController {
53
53
return await this . clubService . getClubs ( user , getClubRequestDto ) ;
54
54
}
55
55
56
+ @Get ( 'hot' )
57
+ async getHotClubs ( ) : Promise < GetHotClubResponseDto [ ] > {
58
+ return await this . clubService . getHotClubs ( ) ;
59
+ }
60
+
61
+ @UseGuards ( OptionalJwtAuthGuard )
62
+ @Get ( 'recommend' )
63
+ async getRecommendClubs (
64
+ @User ( ) user : AuthorizedUserDto | null ,
65
+ @Query ( ) getRecommendClubRequestDto : GetRecommendClubRequestDto ,
66
+ ) : Promise < GetRecommendClubResponseDto [ ] > {
67
+ return await this . clubService . getRecommendClubs (
68
+ user ,
69
+ getRecommendClubRequestDto ,
70
+ ) ;
71
+ }
72
+
56
73
@UseGuards ( OptionalJwtAuthGuard )
57
74
@Get ( '/:clubId' )
58
75
async getClubDetail (
@@ -78,23 +95,6 @@ export class ClubController {
78
95
) ;
79
96
}
80
97
81
- @Get ( 'hot' )
82
- async getHotClubs ( ) : Promise < GetHotClubResponseDto [ ] > {
83
- return await this . clubService . getHotClubs ( ) ;
84
- }
85
-
86
- @UseGuards ( OptionalJwtAuthGuard )
87
- @Get ( 'recommend' )
88
- async getRecommendClubs (
89
- @User ( ) user : AuthorizedUserDto | null ,
90
- @Query ( ) getRecommendClubRequestDto : GetRecommendClubRequestDto ,
91
- ) : Promise < GetRecommendClubResponseDto [ ] > {
92
- return await this . clubService . getRecommendClubs (
93
- user ,
94
- getRecommendClubRequestDto ,
95
- ) ;
96
- }
97
-
98
98
@UseGuards ( JwtAuthGuard , RolesGuard )
99
99
@Roles ( Role . admin )
100
100
@UseInterceptors ( FileInterceptor ( 'clubImage' ) )
0 commit comments