File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -262,9 +262,9 @@ func (h *PostHandler) ListAllPosts(c *gin.Context) {
262262// @Param offset query int false "Number of posts to skip" default(0)
263263// @Success 200 {array} models.PostSummary "Post summaries retrieved successfully"
264264// @Failure 500 {object} models.ErrorResponse
265- // @Router /posts/summaries [get]
265+ // @Router /clubs/{id}/ posts/summaries [get]
266266func (h * PostHandler ) ListPostSummaries (c * gin.Context ) {
267- clubIDParam := c .Param ("club_id " )
267+ clubIDParam := c .Param ("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/:club_id /summaries" , postHandler .ListPostSummaries )
131+ api .GET ("/clubs/:id/posts /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