File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ func (h *PostHandler) ListAllPosts(c *gin.Context) {
264264// @Failure 500 {object} models.ErrorResponse
265265// @Router /posts/summaries [get]
266266func (h * PostHandler ) ListPostSummaries (c * gin.Context ) {
267- clubIDParam := c .Param ("id " )
267+ clubIDParam := c .Param ("club_id " )
268268 clubID , err := strconv .ParseUint (clubIDParam , 10 , 32 )
269269 if err != nil {
270270 c .JSON (http .StatusBadRequest , gin.H {"error" : "invalid club ID" })
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ func (s *Server) setupRoutes() {
128128
129129 api .GET ("/posts/:id/likes" , postHandler .ListLikesByPostID )
130130 api .GET ("/posts" , postHandler .ListAllPosts )
131- api .GET ("/posts/:id /summaries" , postHandler .ListPostSummaries )
131+ api .GET ("/posts/:club_id /summaries" , postHandler .ListPostSummaries )
132132 api .GET ("/posts/:id" , postHandler .GetPostByID )
133133
134134 api .GET ("/posts/:id/comments" , commentHandler .ListCommentsByPostID )
You can’t perform that action at this time.
0 commit comments