mirror of https://github.com/usbharu/Hideout.git
fix: コンテンツネゴシエーションするTypeを指定
This commit is contained in:
parent
b1d341c944
commit
11afa84af6
|
@ -12,10 +12,12 @@ import dev.usbharu.hideout.repository.UserAuthRepository
|
||||||
import dev.usbharu.hideout.repository.UserRepository
|
import dev.usbharu.hideout.repository.UserRepository
|
||||||
import dev.usbharu.hideout.routing.*
|
import dev.usbharu.hideout.routing.*
|
||||||
import dev.usbharu.hideout.service.*
|
import dev.usbharu.hideout.service.*
|
||||||
|
import dev.usbharu.hideout.util.HttpUtil.Activity
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.engine.cio.*
|
import io.ktor.client.engine.cio.*
|
||||||
import io.ktor.client.plugins.contentnegotiation.*
|
import io.ktor.client.plugins.contentnegotiation.*
|
||||||
import io.ktor.client.plugins.logging.*
|
import io.ktor.client.plugins.logging.*
|
||||||
|
import io.ktor.http.*
|
||||||
import io.ktor.serialization.jackson.*
|
import io.ktor.serialization.jackson.*
|
||||||
import io.ktor.server.application.*
|
import io.ktor.server.application.*
|
||||||
import org.jetbrains.exposed.sql.Database
|
import org.jetbrains.exposed.sql.Database
|
||||||
|
@ -46,7 +48,8 @@ fun Application.module() {
|
||||||
single<HttpClient> {
|
single<HttpClient> {
|
||||||
HttpClient(CIO) {
|
HttpClient(CIO) {
|
||||||
install(ContentNegotiation) {
|
install(ContentNegotiation) {
|
||||||
jackson {
|
|
||||||
|
jackson(ContentType.Application.Activity) {
|
||||||
enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
|
enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
|
||||||
setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
|
setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
|
||||||
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
||||||
|
|
Loading…
Reference in New Issue