simpliest version of content upload
This commit is contained in:
@@ -12,16 +12,7 @@ class ClientStaticRoutingConfiguration(
|
||||
private val clientStatic: String?
|
||||
) : ApplicationRoutingConfigurator.Element {
|
||||
override fun Route.invoke() {
|
||||
clientStatic ?.let {
|
||||
static("client") {
|
||||
resources(it)
|
||||
get {
|
||||
call.respondRedirect("client/index.html")
|
||||
}
|
||||
}
|
||||
get {
|
||||
call.respondRedirect("client")
|
||||
}
|
||||
}
|
||||
resources("web")
|
||||
defaultResource("/web/index.html")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ import dev.inmo.postssystem.features.content.binary.server.BinaryServerContentSt
|
||||
import dev.inmo.postssystem.features.content.common.*
|
||||
import dev.inmo.postssystem.features.content.server.storage.ServerContentStorage
|
||||
import dev.inmo.postssystem.features.content.server.ServerContentStorageAggregator
|
||||
import dev.inmo.postssystem.features.content.server.ServerContentStorageWrapper
|
||||
import dev.inmo.postssystem.features.content.text.common.TextContent
|
||||
import dev.inmo.postssystem.features.content.text.common.TextContentSerializerModuleConfigurator
|
||||
import dev.inmo.postssystem.features.content.text.server.TextServerContentStorage
|
||||
import dev.inmo.postssystem.features.posts.server.ExposedServerPostsStorage
|
||||
@@ -55,6 +57,7 @@ import org.koin.core.module.Module
|
||||
import org.koin.core.parameter.ParametersHolder
|
||||
import org.koin.core.qualifier.StringQualifier
|
||||
import org.koin.dsl.*
|
||||
import org.w3c.dom.Text
|
||||
import java.io.File
|
||||
|
||||
private fun Route.print() {
|
||||
@@ -169,8 +172,18 @@ fun getDIModule(
|
||||
WriteDistFilesStorage(get(binaryFilesFolderQualifier), get(binaryFilesMetasKeyValueRepoQualifier))
|
||||
)
|
||||
}
|
||||
singleWithRandomQualifier { BinaryServerContentStorage(get(binaryStorageFilesQualifier)) }
|
||||
singleWithRandomQualifier { TextServerContentStorage(get()) }
|
||||
singleWithRandomQualifier {
|
||||
ServerContentStorageWrapper(
|
||||
BinaryServerContentStorage(get(binaryStorageFilesQualifier)),
|
||||
BinaryContent::class
|
||||
)
|
||||
}
|
||||
singleWithRandomQualifier {
|
||||
ServerContentStorageWrapper(
|
||||
TextServerContentStorage(get()),
|
||||
TextContent::class
|
||||
)
|
||||
}
|
||||
|
||||
single<ServerContentStorage<Content>> { ServerContentStorageAggregator(getAll(), get()) }
|
||||
|
||||
@@ -213,7 +226,7 @@ fun getDIModule(
|
||||
)
|
||||
}
|
||||
singleWithBinds { AuthenticationRoutingConfigurator(get(), get(), get()) }
|
||||
singleWithBinds { NotFoundStatusPageRedirectToIndex("/client") }
|
||||
singleWithBinds { NotFoundStatusPageRedirectToIndex("/") }
|
||||
|
||||
if (config.debugMode) {
|
||||
single<ApplicationRoutingConfigurator.Element>(StringQualifier("Tracer")) { ApplicationRoutingConfigurator.Element {(this as Routing).trace { application.log.trace(it.buildText()) } } }
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user