mirror of https://github.com/usbharu/Hideout.git
fix: JavaScriptがBigIntを扱えない問題を修正
This commit is contained in:
parent
0b57b438f9
commit
377a73a878
|
@ -59,7 +59,7 @@ kotlin {
|
|||
}
|
||||
|
||||
sourceSets.main {
|
||||
java.srcDirs("build/generated/ksp/main/kotlin")
|
||||
kotlin.srcDirs("$buildDir/generated/ksp/main")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -5,7 +5,7 @@ import dev.usbharu.hideout.domain.model.hideout.entity.User
|
|||
import dev.usbharu.hideout.domain.model.hideout.entity.Visibility
|
||||
|
||||
data class PostResponse(
|
||||
val id: Long,
|
||||
val id: String,
|
||||
val user: UserResponse,
|
||||
val overview: String? = null,
|
||||
val text: String? = null,
|
||||
|
@ -17,7 +17,7 @@ data class PostResponse(
|
|||
companion object {
|
||||
fun from(post: Post, user: User): PostResponse {
|
||||
return PostResponse(
|
||||
id = post.id,
|
||||
id = post.id.toString(),
|
||||
user = UserResponse.from(user),
|
||||
overview = post.overview,
|
||||
text = post.text,
|
||||
|
|
|
@ -3,7 +3,7 @@ package dev.usbharu.hideout.domain.model.hideout.dto
|
|||
import dev.usbharu.hideout.domain.model.hideout.entity.User
|
||||
|
||||
data class UserResponse(
|
||||
val id: Long,
|
||||
val id: String,
|
||||
val name: String,
|
||||
val domain: String,
|
||||
val screenName: String,
|
||||
|
@ -14,7 +14,7 @@ data class UserResponse(
|
|||
companion object {
|
||||
fun from(user: User): UserResponse {
|
||||
return UserResponse(
|
||||
id = user.id,
|
||||
id = user.id.toString(),
|
||||
name = user.name,
|
||||
domain = user.domain,
|
||||
screenName = user.screenName,
|
||||
|
|
|
@ -13,9 +13,9 @@ import dev.usbharu.hideout.service.activitypub.ActivityPubUserService
|
|||
import dev.usbharu.hideout.service.api.IPostApiService
|
||||
import dev.usbharu.hideout.service.api.IUserApiService
|
||||
import dev.usbharu.hideout.service.auth.HttpSignatureVerifyService
|
||||
import dev.usbharu.hideout.service.reaction.IReactionService
|
||||
import dev.usbharu.hideout.service.auth.IJwtService
|
||||
import dev.usbharu.hideout.service.core.IMetaService
|
||||
import dev.usbharu.hideout.service.reaction.IReactionService
|
||||
import dev.usbharu.hideout.service.user.IUserAuthService
|
||||
import dev.usbharu.hideout.service.user.IUserService
|
||||
import io.ktor.server.application.*
|
||||
|
|
|
@ -81,7 +81,7 @@ fun Route.users(userService: IUserService, userApiService: IUserApiService) {
|
|||
}
|
||||
val acct = AcctUtil.parse(userParameter)
|
||||
val targetUser = userApiService.findByAcct(acct)
|
||||
if (userService.followRequest(targetUser.id, userId)) {
|
||||
if (userService.followRequest(targetUser.id.toLong(), userId)) {
|
||||
return@post call.respond(HttpStatusCode.OK)
|
||||
} else {
|
||||
return@post call.respond(HttpStatusCode.Accepted)
|
||||
|
|
|
@ -355,8 +355,7 @@ components:
|
|||
description: 投稿ID
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
userName:
|
||||
name: userName
|
||||
in: path
|
||||
|
@ -385,8 +384,7 @@ components:
|
|||
- createdAt
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
format: int64
|
||||
type: string
|
||||
readOnly: true
|
||||
name:
|
||||
type: string
|
||||
|
@ -402,7 +400,7 @@ components:
|
|||
type: string
|
||||
readOnly: true
|
||||
createdAt:
|
||||
type: number
|
||||
type: integer
|
||||
readOnly: true
|
||||
PostResponse:
|
||||
type: object
|
||||
|
@ -416,8 +414,7 @@ components:
|
|||
- sensitive
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
readOnly: true
|
||||
user:
|
||||
$ref: "#/components/schemas/UserResponse"
|
||||
|
@ -436,12 +433,10 @@ components:
|
|||
format: uri
|
||||
readOnly: true
|
||||
repostId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
readOnly: true
|
||||
replyId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
readOnly: true
|
||||
sensitive:
|
||||
type: boolean
|
||||
|
@ -456,11 +451,9 @@ components:
|
|||
visibility:
|
||||
$ref: "#/components/schemas/Visibility"
|
||||
repostId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
replyId:
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
sensitive:
|
||||
type: boolean
|
||||
|
||||
|
|
Loading…
Reference in New Issue