fix: クエリパラメータのパラメータ名の形式を修正

fix #577
This commit is contained in:
usbharu 2024-09-04 16:50:27 +09:00
parent 975fd5160b
commit fec59ab622
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
3 changed files with 8 additions and 8 deletions

View File

@ -22,9 +22,9 @@ class TimelineController(
@GetMapping("/home") @GetMapping("/home")
suspend fun homeTimeline( suspend fun homeTimeline(
model: Model, model: Model,
@RequestParam sinceId: String?, @RequestParam("since_id") sinceId: String?,
@RequestParam maxId: String?, @RequestParam("max_id") maxId: String?,
@RequestParam minId: String? @RequestParam("min_id") minId: String?
): String { ): String {
val principal = springSecurityFormLoginPrincipalContextHolder.getPrincipal() val principal = springSecurityFormLoginPrincipalContextHolder.getPrincipal()
val userDetail = transaction.transaction { val userDetail = transaction.transaction {

View File

@ -25,9 +25,9 @@ class UserController(
@GetMapping("/users/{name}") @GetMapping("/users/{name}")
suspend fun userById( suspend fun userById(
@PathVariable name: String, @PathVariable name: String,
@RequestParam minId: Long?, @RequestParam("min_id") minId: Long?,
@RequestParam maxId: Long?, @RequestParam("max_id") maxId: Long?,
@RequestParam sinceId: Long?, @RequestParam("since_id") sinceId: Long?,
model: Model model: Model
): String { ): String {
val principal = springSecurityFormLoginPrincipalContextHolder.getPrincipal() val principal = springSecurityFormLoginPrincipalContextHolder.getPrincipal()

View File

@ -8,7 +8,7 @@
<th:block th:fragment="simple-timline(timelineObject,href)"> <th:block th:fragment="simple-timline(timelineObject,href)">
<!--/*@thymesVar id="timelineObject" type="dev.usbharu.hideout.core.domain.model.support.page.PaginationList<dev.usbharu.hideout.core.application.post.PostDetail,dev.usbharu.hideout.core.domain.model.post.PostId>"*/--> <!--/*@thymesVar id="timelineObject" type="dev.usbharu.hideout.core.domain.model.support.page.PaginationList<dev.usbharu.hideout.core.application.post.PostDetail,dev.usbharu.hideout.core.domain.model.post.PostId>"*/-->
<div th:if="${timelineObject.prev != null}"> <div th:if="${timelineObject.prev != null}">
<a th:href="${href + '?minId=' + timelineObject.prev.id}" th:text="#{common.paging-load}">Show more</a> <a th:href="${href + '?min_id=' + timelineObject.prev.id}" th:text="#{common.paging-load}">Show more</a>
</div> </div>
<div th:if="${timelineObject.isEmpty()}" th:text="#{common.empty}"></div> <div th:if="${timelineObject.isEmpty()}" th:text="#{common.empty}"></div>
<div th:each="postDetail : ${timelineObject}"> <div th:each="postDetail : ${timelineObject}">
@ -16,7 +16,7 @@
<th:block th:replace="~{fragments-post :: single-post-controller(${postDetail})}"></th:block> <th:block th:replace="~{fragments-post :: single-post-controller(${postDetail})}"></th:block>
</div> </div>
<div th:if="${timelineObject.next != null}"> <div th:if="${timelineObject.next != null}">
<a th:href="${href + '?maxId=' + timelineObject.next.id}" th:text="#{common.paging-load}">Show more</a> <a th:href="${href + '?max_id=' + timelineObject.next.id}" th:text="#{common.paging-load}">Show more</a>
</div> </div>
</th:block> </th:block>
</body> </body>