things
This commit is contained in:
@@ -12,7 +12,7 @@ import kotlin.random.Random
|
||||
|
||||
//átlagos JAVA alapú fejlesztő
|
||||
|
||||
val httpPort: Int = System.getenv("HTTP_PORT")?.toInt() ?: 80
|
||||
val httpPort: Int = System.getenv("HTTP_PORT")?.toInt() ?: 8080
|
||||
val resourcesPath: String = System.getenv("RESOURCES") ?: "src/main/resources/"
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@ object ConversationHandler {
|
||||
{
|
||||
val stringBuilder = StringBuilder()
|
||||
|
||||
|
||||
|
||||
for (conversation in conversations)
|
||||
{
|
||||
stringBuilder.append(conversation.list())
|
||||
}
|
||||
|
||||
println(stringBuilder.toString())
|
||||
|
||||
return stringBuilder.toString()
|
||||
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class Conversation(val ID: Int)
|
||||
<p style="flex-grow: 1;">$ID</p>
|
||||
<p style="flex-grow: 9;">${messages.last().text}</p>
|
||||
<button style="flex-grow: 1;" onclick="open_message($ID)">reply</button>
|
||||
<div>
|
||||
</div>
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
@@ -194,8 +194,12 @@ fun runEmbeddedServer()
|
||||
}
|
||||
|
||||
get("/api/reinit/{id}") {
|
||||
ConversationHandler.newConv(call.parameters["id"]?.toInt() ?: -1)
|
||||
println(ConversationHandler.conversations.last().ID)
|
||||
if (ConversationHandler.conversations.filter { it.ID == call.parameters["id"]?.toInt()}.size != 1)
|
||||
{
|
||||
ConversationHandler.newConv(call.parameters["id"]?.toInt() ?: -1)
|
||||
println(ConversationHandler.conversations.last().ID)
|
||||
}
|
||||
|
||||
call.respond(HttpStatusCode.OK)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user