전체 게시글 조회수 순으로 정렬

API
post
METHOD
GET
PATH
api/posts?page=0&size=10&sortBy=viewCount
개발완료
담당자

Description

<전체 게시글 조회수 순으로 정렬 조회>
전체 게시글 조회수 순으로 정렬 조회

Response

{ "content": [ { "id": 1, "memberId": 1, "memberName": "semi", "drink": { "id": 1, "placeName": "서울특별시", "name": "맛있는 특산주", "type": "BEER", "degree": 7.0, "sweetness": 5, "cost": 5000, "averageRating": null, "description": "초콜릿으로 만든 맥주", "imageUrl": null, "createdAt": "2024-09-23T23:36:35" }, "type": "REVIEW", "content": "이 막걸리는 독특한 맛을 가지고 있어요!", "rating": 4.5, "tags": [ { "tagId": 1, "tagName": "고소" }, { "tagId": 2, "tagName": "풍미" } ], "imageUrl": "http://example.com/image.png", "viewCount": 8, "likeCount": 0, "createdAt": "2024-09-26T02:20:41.851615", "updatedAt": "2024-09-26T02:24:21.533529", "isLiked": false }, { "id": 2, "memberId": 2, "memberName": "John", "drink": { "id": 1, "placeName": "서울특별시", "name": "맛있는 특산주", "type": "BEER", "degree": 7.0, "sweetness": 5, "cost": 5000, "averageRating": null, "description": "초콜릿으로 만든 맥주", "imageUrl": null, "createdAt": "2024-09-23T23:36:35" }, "type": "AD", "content": "위 맥주를 추천합니다.", "rating": 4.8, "tags": [ { "tagId": 3, "tagName": "새콤" }, { "tagId": 4, "tagName": "달콤" } ], "imageUrl": "http://example.com/image.png", "viewCount": 3, "likeCount": 0, "createdAt": "2024-09-26T02:22:37.577553", "updatedAt": "2024-09-26T02:22:37.57759", "isLiked": false } ], "pageable": { "pageNumber": 0, "pageSize": 10, "sort": { "empty": true, "sorted": false, "unsorted": true }, "offset": 0, "paged": true, "unpaged": false }, "last": true, "totalPages": 1, "totalElements": 2, "first": true, "size": 10, "number": 0, "sort": { "empty": true, "sorted": false, "unsorted": true }, "numberOfElements": 2, "empty": false }
JSON
복사

Error

HTTP/1.1 4XX
”에러 메시지”