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")
suspend fun homeTimeline(
model: Model,
@RequestParam sinceId: String?,
@RequestParam maxId: String?,
@RequestParam minId: String?
@RequestParam("since_id") sinceId: String?,
@RequestParam("max_id") maxId: String?,
@RequestParam("min_id") minId: String?
): String {
val principal = springSecurityFormLoginPrincipalContextHolder.getPrincipal()
val userDetail = transaction.transaction {

View File

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

View File

@ -8,7 +8,7 @@
<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>"*/-->
<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 th:if="${timelineObject.isEmpty()}" th:text="#{common.empty}"></div>
<div th:each="postDetail : ${timelineObject}">
@ -16,7 +16,7 @@
<th:block th:replace="~{fragments-post :: single-post-controller(${postDetail})}"></th:block>
</div>
<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>
</th:block>
</body>