diff --git a/src/main/kotlin/dev/usbharu/hideout/application/infrastructure/exposed/Page.kt b/src/main/kotlin/dev/usbharu/hideout/application/infrastructure/exposed/Page.kt index cff9e245..71df7898 100644 --- a/src/main/kotlin/dev/usbharu/hideout/application/infrastructure/exposed/Page.kt +++ b/src/main/kotlin/dev/usbharu/hideout/application/infrastructure/exposed/Page.kt @@ -31,11 +31,15 @@ sealed class Page { ): Page = if (minId != null) { PageByMinId( - maxId, minId, limit + maxId, + minId, + limit ) } else { PageByMaxId( - maxId, sinceId, limit + maxId, + sinceId, + limit ) } } diff --git a/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/account/MastodonAccountApiController.kt b/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/account/MastodonAccountApiController.kt index 64700a54..a32d1910 100644 --- a/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/account/MastodonAccountApiController.kt +++ b/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/account/MastodonAccountApiController.kt @@ -27,7 +27,8 @@ class MastodonAccountApiController( ) : AccountApi { override suspend fun apiV1AccountsIdFollowPost( - id: String, followRequestBody: FollowRequestBody? + id: String, + followRequestBody: FollowRequestBody? ): ResponseEntity { val userid = loginUserContextHolder.getLoginUserId() @@ -38,11 +39,17 @@ class MastodonAccountApiController( ResponseEntity.ok(accountApiService.account(id.toLong())) override suspend fun apiV1AccountsVerifyCredentialsGet(): ResponseEntity = ResponseEntity( - accountApiService.verifyCredentials(loginUserContextHolder.getLoginUserId()), HttpStatus.OK + accountApiService.verifyCredentials(loginUserContextHolder.getLoginUserId()), + HttpStatus.OK ) override suspend fun apiV1AccountsPost( - username: String, password: String, email: String?, agreement: Boolean?, locale: Boolean?, reason: String? + username: String, + password: String, + email: String?, + agreement: Boolean?, + locale: Boolean?, + reason: String? ): ResponseEntity { transaction.transaction { accountApiService.registerAccount(UserCreateDto(username, username, "", password)) @@ -93,7 +100,8 @@ class MastodonAccountApiController( } override fun apiV1AccountsRelationshipsGet( - id: List?, withSuspended: Boolean + id: List?, + withSuspended: Boolean ): ResponseEntity> = runBlocking { val userid = loginUserContextHolder.getLoginUserId() @@ -164,8 +172,12 @@ class MastodonAccountApiController( val userid = loginUserContextHolder.getLoginUserId() val followRequests = accountApiService.followRequests( - userid, false, Page.PageByMaxId( - maxId?.toLongOrNull(), sinceId?.toLongOrNull(), limit?.coerceIn(0, 80) ?: 40 + userid, + false, + Page.PageByMaxId( + maxId?.toLongOrNull(), + sinceId?.toLongOrNull(), + limit?.coerceIn(0, 80) ?: 40 ) ) diff --git a/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/notification/MastodonNotificationApiController.kt b/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/notification/MastodonNotificationApiController.kt index 1c8905c1..88d06682 100644 --- a/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/notification/MastodonNotificationApiController.kt +++ b/src/main/kotlin/dev/usbharu/hideout/mastodon/interfaces/api/notification/MastodonNotificationApiController.kt @@ -55,7 +55,6 @@ class MastodonNotificationApiController( ) ResponseEntity.ok().header("Link", httpHeader).body(notifications.asFlow()) - } override suspend fun apiV1NotificationsIdDismissPost(id: String): ResponseEntity {