refactor(frontend, build): update PingViewModel initialization, resolve view model via Koin, and clean yarn dependencies
Injected `PingViewModel` via Koin to align with dependency injection best practices. Suppressed Gradle deprecation warnings and added the `frontend.core.sync` dependency. Cleaned up outdated packages in `yarn.lock`.
This commit is contained in:
@@ -27,6 +27,7 @@ kotlin {
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package at.mocode.ping.api
|
||||
|
||||
import at.mocode.core.sync.Syncable
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@@ -21,3 +22,15 @@ data class HealthResponse(
|
||||
val service: String,
|
||||
val healthy: Boolean
|
||||
)
|
||||
|
||||
/**
|
||||
* Sync-Contract: Ping Event für Delta-Sync.
|
||||
*/
|
||||
@Serializable
|
||||
data class PingEvent(
|
||||
// Using a String for the ID to be compatible with UUIDs from the backend.
|
||||
override val id: String,
|
||||
val message: String,
|
||||
// Using a Long for the timestamp, which can be derived from a UUIDv7.
|
||||
override val lastModified: Long
|
||||
) : Syncable
|
||||
|
||||
Reference in New Issue
Block a user