Thread
#exposed
    dany giguere

    dany giguere

    4 months ago
    Good morning everyone. I can return my user in a mapping like :
    val user = userDSL.show(id)
                call.respond(mapOf("user" to user))
    but it won’t let me do
    call.respond(user)
    I get this error:
    Type mismatch: inferred type is User? but TypeVariable(T) was expected
    why ?
    hfhbd

    hfhbd

    4 months ago
    user is nullable, Ktor call.responds require a non null value