provide to server work with posts
This commit is contained in:
server/src/main/java/dev/inmo/postssystem/server
services/posts/server/src/jvmMain/kotlin/dev/inmo/postssystem/services/posts/server
@ -35,7 +35,7 @@ import dev.inmo.postssystem.features.posts.server.ExposedServerPostsStorage
|
||||
import dev.inmo.postssystem.features.posts.server.ServerPostsStorage
|
||||
import dev.inmo.postssystem.features.publication.server.PublicationManager
|
||||
import dev.inmo.postssystem.features.publication.server.PublicationTarget
|
||||
import dev.inmo.postssystem.services.posts.server.ServerPostsServiceRoutingConfigurator
|
||||
import dev.inmo.postssystem.services.posts.server.*
|
||||
import dev.inmo.postssystem.targets.telegram.publication.server.PublicationTargetTelegram
|
||||
import io.ktor.application.featureOrNull
|
||||
import io.ktor.application.log
|
||||
@ -177,6 +177,13 @@ fun getDIModule(
|
||||
// Posts storage
|
||||
single<ServerPostsStorage> { ExposedServerPostsStorage(get()) }
|
||||
|
||||
singleWithBinds {
|
||||
ServerPostsService(
|
||||
DefaultExposedReadPostsService(get<ServerPostsStorage>()),
|
||||
DefaultWritePostsService(get<ServerPostsStorage>(), get<ServerContentStorage<Content>>())
|
||||
)
|
||||
}
|
||||
|
||||
// Routing configurators
|
||||
singleWithBinds { FilesRoutingConfigurator(get(), null, get()) }
|
||||
singleWithBinds { StatusRoutingConfigurator }
|
||||
|
Reference in New Issue
Block a user