mirror of https://github.com/usbharu/Hideout.git
feat: DIに登録
This commit is contained in:
parent
d91d810e4d
commit
3ccdc81b20
|
@ -25,11 +25,6 @@ import io.ktor.client.*
|
|||
import io.ktor.client.engine.cio.*
|
||||
import io.ktor.client.plugins.logging.*
|
||||
import io.ktor.server.application.*
|
||||
import kjob.core.Job
|
||||
import kjob.core.KJob
|
||||
import kjob.core.dsl.JobContextWithProps
|
||||
import kjob.core.dsl.JobRegisterContext
|
||||
import kjob.core.dsl.KJobFunctions
|
||||
import kjob.core.kjob
|
||||
import org.jetbrains.exposed.sql.Database
|
||||
import org.koin.ktor.ext.inject
|
||||
|
@ -82,9 +77,10 @@ fun Application.parent() {
|
|||
}
|
||||
}
|
||||
single<ActivityPubFollowService> { ActivityPubFollowServiceImpl(get(), get(), get(), get()) }
|
||||
single<ActivityPubService> { ActivityPubServiceImpl(get()) }
|
||||
single<ActivityPubService> { ActivityPubServiceImpl(get(), get()) }
|
||||
single<UserService> { UserService(get()) }
|
||||
single<ActivityPubUserService> { ActivityPubUserServiceImpl(get(), get(), get()) }
|
||||
single<ActivityPubNoteService> { ActivityPubNoteServiceImpl(get(), get(), get()) }
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,6 +97,7 @@ fun Application.parent() {
|
|||
inject<ActivityPubUserService>().value
|
||||
)
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
fun Application.worker() {
|
||||
val kJob = kjob(ExposedKJob) {
|
||||
|
|
|
@ -39,6 +39,7 @@ class PostRepositoryImpl(database: Database, private val idGenerateService: IdGe
|
|||
}
|
||||
return@query PostEntity(
|
||||
generateId,
|
||||
post.userId,
|
||||
post.overview,
|
||||
post.text,
|
||||
post.createdAt,
|
||||
|
|
Loading…
Reference in New Issue